W3cubDocs

/Web APIs

Element: pointerrawupdate event

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The pointerrawupdate PointerEvent is fired when a pointer changes any properties that don't fire pointerdown or pointerup events. See pointermove for a list of these properties.

The pointerrawupdate event may have coalesced events if there is already another pointerrawupdate event with the same pointer ID that hasn't been dispatched in the event loop. For information on coalesced events, see the PointerEvent.getCoalescedEvents documentation.

Listeners for pointerrawupdate events should only be added if your JavaScript needs high-frequency events and can handle them as quickly as they are dispatched. For most use cases, other pointer event types should suffice as there may be performance implications to adding listeners for pointerrawupdate events.

Syntax

Use the event name in methods like addEventListener(), or set an event handler property.

js

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

onpointerrawupdate = (event) => {};

Event type

Event properties

This event implements the properties of the PointerEvent interface.

Example

js

addEventListener("pointerrawupdate", (event) => {
  if (event.getCoalescedEvents && event.getCoalescedEvents().length > 1) {
    console.log("Coalesced events:", event.getCoalescedEvents().length);
    for (let coalescedEvent of event.getCoalescedEvents()) {
      // Do something with the coalesced events.
    }
  } else {
    // Do something with the event.
    console.log("Raw event", event);
  }
});

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
pointerrawupdate_event 77 79 No No 64 No 77 77 No 55 No 12.0

See also

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/Element/pointerrawupdate_event