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

Specification
Pointer Events
# the-pointerrawupdate-event
Pointer Events
# dom-globaleventhandlers-onpointerrawupdate

Browser compatibility

BCD tables only load in the browser

See also