v130 ยท user input
Coalesced/predicted events in untrusted PointerEvents will retain original targets
For untrusted (i.e. JS constructed) PointerEvents, the events returned by PointerEvent.getCoalescedEvents() and PointerEvent.getPredictedEvents() will maintain their original targets and offsetX/Y coordinates, instead of behaving like trusted events where these fields are affected by the parent (container) event.
concepts
-
Coalesced PE target
Compare trusted browser input with a synthetic pointermove whose coalesced sub-events target different boxes. In Chrome 130+ untrusted sub-events keep their original targets instead of being retargeted to the parent.
-
Predicted events forecast
The sister API:
getPredictedEvents(). Draw on a real pad to capture coalesced + predicted samples, then replay them as untrusted events on a second pad to confirmoffsetX/Yare preserved end-to-end. -
Replay test harness
Record a trusted pointer path, replay it as a synthetic parent event whose coalesced sub-events target box A and box B, then run a 6-point contract test (dispatch, sub-event type, target preservation per side, offsetX/Y preservation, isTrusted=false). Catches the exact regression mode the spec change exists to fix.
-
Event Replay Inspector
Draw a gesture on the record canvas, then click Replay to dispatch the same path as untrusted
PointerEvents. The event log shows each event's preservedoffsetX/Yvalues โ demonstrating Chrome 130's fix for record/replay tools.
why it shipped
For untrusted (i.e. JS constructed) PointerEvents, the events returned by PointerEvent.getCoalescedEvents() and PointerEvent.getPredictedEvents() will maintain their original targets and offsetX/Y coordinates, instead of behaving like trusted events where these fields are affected by the parent (container) event.