JavaScript Element pointerrawupdate Event

Beginner
⏱️ 12 min read
📚 Updated: Jul 2026
🎯 5 Examples
🚀 5 Try-it labs
DOM event
Instance event

What You’ll Learn

The pointerrawupdate event delivers high-frequency pointer property updates for precision apps. Learn how it differs from pointermove, getCoalescedEvents(), secure-context rules, performance tips, and five try-it labs.

01

Kind

Instance event

02

Type

PointerEvent

03

When

High-rate property updates

04

Handler

onpointerrawupdate

05

Context

HTTPS (secure)

06

Status

Limited availability

Introduction

Most UIs only need pointermove. Drawing tools, ink, and precision trackers sometimes need every sample the device produces. pointerrawupdate is that higher-frequency path.

MDN recommends it only when coalesced pointermove events are not smooth enough—and warns that listening can hurt performance. For everyday drag and hover, stick with pointermove.

💡
Beginner tip

This feature needs a secure context (HTTPS or localhost) in supporting browsers. Feature-detect and fall back to pointermove when it is missing (for example in Safari).

Understanding pointerrawupdate

An instance event that answers: “Did pointer properties change again—possibly faster than a normal pointermove?”

  • Same property family as move — not pointerdown / pointerup.
  • High frequency — may fire more often than coalesced moves.
  • Coalesced samples — check event.getCoalescedEvents().
  • Bubbles + composed — not cancelable; no default action.
  • Limited availability on MDN (not Baseline)—Safari lacks support.

📝 Syntax

Use the event name with addEventListener, or set the handler property:

JavaScript
addEventListener("pointerrawupdate", (event) => { });

onpointerrawupdate = (event) => { };

Event type

A PointerEvent (inherits from MouseEvent and Event).

Handy properties & methods

NameMeaning
clientX / clientYPointer position in the viewport
pointerIdUnique id for this pointer stream
pointerTypemouse, pen, touch, etc.
pressureNormalized pressure when available
getCoalescedEvents()Earlier samples merged into this dispatch

⚖️ pointerrawupdate vs pointermove

Topicpointerrawupdatepointermove
Typical useHigh-precision draw / inkDrag, hover, most UIs
FrequencyCan be higherOften coalesced / lower
BaselineLimited availabilityWidely available
Secure contextRequired (supporting browsers)Not specially restricted
CancelableNoYes

⚡ When (Not) to Listen

  • Prefer pointermove unless you truly need extra samples.
  • Keep handlers tiny—store points, paint later with requestAnimationFrame.
  • Remove listeners when the precision mode ends (do not leave them forever).
  • Always provide a pointermove fallback for browsers without support.

🔒 Secure Context

MDN marks pointerrawupdate as available only in secure contexts (HTTPS / localhost) in supporting browsers. Check window.isSecureContext and feature-detect before relying on the event.

⚡ Quick Reference

GoalCode / note
Listenel.addEventListener("pointerrawupdate", fn)
Handler propertyel.onpointerrawupdate = fn
Coalesced samplesevent.getCoalescedEvents()
Fallbackpointermove
Secure?window.isSecureContext
MDN statusLimited availability (not Baseline)

🔍 At a Glance

Four facts to remember about pointerrawupdate.

Event type
PointerEvent

High-rate updates

vs move
more samples

Precision apps

Context
HTTPS

Secure required

Availability
limited

Not Baseline

Examples Gallery

Examples follow MDN Element: pointerrawupdate event. Use Chrome/Edge/Firefox over HTTPS (or localhost). Safari may show the fallback path.

📚 Getting Started

Detect support and use the handler property safely.

Example 1 — Feature-Detect & Log

Only listen when the event name is supported.

JavaScript
const stage = document.getElementById("stage");
const out = document.getElementById("out");
const supported = "onpointerrawupdate" in window;

if (!supported) {
  out.textContent = "pointerrawupdate not supported — use pointermove";
} else {
  stage.addEventListener("pointerrawupdate", (event) => {
    out.textContent = "raw @" + event.clientX + "," + event.clientY;
  });
}
Try It Yourself

How It Works

Checking "onpointerrawupdate" in window avoids silent failures in unsupported browsers.

Example 2 — onpointerrawupdate Property

Same idea using the handler property form.

JavaScript
const stage = document.getElementById("stage");
const out = document.getElementById("out");

if ("onpointerrawupdate" in window) {
  stage.onpointerrawupdate = (event) => {
    out.textContent =
      "onpointerrawupdate type=" + event.pointerType +
      " @" + event.clientX + "," + event.clientY;
  };
} else {
  out.textContent = "Handler property missing";
}
Try It Yourself

How It Works

Prefer addEventListener when you need multiple listeners or easy removal.

📈 Rate, Coalescing & Fallback

Compare fire rates, read coalesced samples, and degrade gracefully.

Example 3 — Count vs pointermove

Move quickly and compare how often each event fires.

JavaScript
const stage = document.getElementById("stage");
const out = document.getElementById("out");
let rawCount = 0;
let moveCount = 0;

function render() {
  out.textContent =
    "pointerrawupdate=" + rawCount + " pointermove=" + moveCount;
}

if ("onpointerrawupdate" in window) {
  stage.addEventListener("pointerrawupdate", () => {
    rawCount++;
    render();
  });
}

stage.addEventListener("pointermove", () => {
  moveCount++;
  render();
});
Try It Yourself

How It Works

Exact ratios vary by device and browser, but raw updates often outpace coalesced moves.

Example 4 — getCoalescedEvents() (MDN)

Process coalesced samples when the browser batches them.

JavaScript
const stage = document.getElementById("stage");
const out = document.getElementById("out");

stage.addEventListener("pointerrawupdate", (event) => {
  if (event.getCoalescedEvents && event.getCoalescedEvents().length > 1) {
    const list = event.getCoalescedEvents();
    out.textContent = "Coalesced events: " + list.length;
    // for (const coalescedEvent of list) { /* use each sample */ }
  } else {
    out.textContent = "Raw event @" + event.clientX + "," + event.clientY;
  }
});
Try It Yourself

How It Works

When another raw update for the same pointerId was pending, the dispatched event may expose those earlier samples.

Example 5 — Secure Context + Fallback

Require HTTPS/localhost support, otherwise use pointermove.

JavaScript
const stage = document.getElementById("stage");
const out = document.getElementById("out");
const canUseRaw =
  window.isSecureContext && ("onpointerrawupdate" in window);

function onUpdate(event, label) {
  out.textContent = label + " @" + event.clientX + "," + event.clientY;
}

if (canUseRaw) {
  stage.addEventListener("pointerrawupdate", (e) => onUpdate(e, "raw"));
} else {
  stage.addEventListener("pointermove", (e) => onUpdate(e, "move-fallback"));
}
Try It Yourself

How It Works

Production ink tools should always ship a pointermove path for Safari and insecure pages.

🚀 Common Use Cases

  • High-precision drawing, handwriting, and stylus ink.
  • Apps that replay every sample via getCoalescedEvents().
  • Latency-sensitive tracking where coalesced moves feel choppy.
  • Not for everyday drag handles—prefer pointermove.
  • Teaching Progressive Enhancement: raw path + move fallback.

🔧 How It Works

1

Pointer properties change

Position, pressure, tilt, etc.—not down/up transitions.

Input
2

Raw update queued

May coalesce with pending updates for the same pointerId.

Queue
3

pointerrawupdate

Dispatched (HTTPS); bubbles / composed; not cancelable.

Event
4

Consume lightly

Store samples; paint later; fall back to pointermove if needed.

📝 Notes

  • MDN: Limited availability (not Baseline)—no Deprecated / Experimental / Non-standard banner.
  • Requires a secure context in supporting browsers.
  • Listening can affect performance; use only for high-frequency needs.
  • Safari typically lacks support—ship a pointermove fallback.
  • Related learning: pointerover, pointerup, pointermove, addEventListener(), JavaScript hub.

Browser Support

pointerrawupdate is marked Limited availability on MDN (not Baseline). Logos use the shared browser-image-sprite.png sprite from this project. It requires a secure context; Safari generally does not support it—always fall back to pointermove.

Limited availability

Element pointerrawupdate

High-frequency pointer updates for precision apps; HTTPS required; prefer pointermove for most UIs.

Partial Not Baseline
Google Chrome Supported (secure context)
Yes
Mozilla Firefox Supported (secure context)
Yes
Apple Safari Not supported
No
Microsoft Edge Supported (secure context)
Yes
Opera Supported (secure context)
Yes
Internet Explorer Not supported
No
pointerrawupdate Limited

Bottom line: Use Chromium / Firefox over HTTPS for raw updates. Keep pointermove as the default path everywhere else.

Conclusion

pointerrawupdate is a specialized high-frequency pointer stream for precision input. Prefer pointermove unless you need those extra samples—and always feature-detect with a secure-context check.

Continue with pointerup, pointermove, pointerdown, or the JavaScript hub.

💡 Best Practices

✅ Do

  • Default to pointermove for everyday tracking
  • Feature-detect + check isSecureContext
  • Use getCoalescedEvents() when replaying every sample
  • Keep handlers cheap; paint with requestAnimationFrame
  • Remove raw listeners when precision mode ends

❌ Don’t

  • Attach raw listeners site-wide “just in case”
  • Assume Safari support
  • Do heavy DOM work on every raw update
  • Ignore HTTPS requirements
  • Overwrite onpointerrawupdate if you need multiple listeners

Key Takeaways

Knowledge Unlocked

Five things to remember about pointerrawupdate

High-frequency pointer samples—specialized, costly, and not Baseline.

5
Core concepts
📄02

Coalesced

getCoalescedEvents

API
03

vs move

prefer move usually

Compare
🔒04

HTTPS

secure context

Security
🎯05

Limited

not Baseline

Status

❓ Frequently Asked Questions

It fires when a pointer changes properties that do not fire pointerdown or pointerup (the same kind of changes that drive pointermove). It is meant for high-precision input and can arrive more frequently than coalesced pointermove events.
No. MDN does not mark Element pointerrawupdate as Deprecated, Experimental, or Non-standard. It has Limited availability (not Baseline)—notably missing in Safari—and requires a secure context (HTTPS) in supporting browsers.
A PointerEvent (inherits from MouseEvent and Event). It bubbles and is composed, but is not cancelable and has no default action.
pointermove is the usual coalesced move stream for most apps. pointerrawupdate can deliver higher-frequency updates (and may include getCoalescedEvents) for drawing or precision tools that need every sample.
Listening can affect performance because events may fire extremely often. Add listeners only if your code needs high-frequency updates and can keep up; otherwise prefer pointermove.
If another pointerrawupdate for the same pointerId is still waiting in the event loop, the dispatched event may expose earlier samples via event.getCoalescedEvents(). MDN documents this for high-precision handling.
Did you know?

Spec / MDN note that pointerrawupdate bubbles and is composed, but is not cancelable and has no default action—unlike pointermove, which is cancelable.

Next: pointerup

Learn the PointerEvent that fires when a pointer becomes inactive.

pointerup →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

5 people found this page helpful