demo · v130
Event Replay Inspector
Chrome 130 ensures that untrusted (JS-constructed) PointerEvents returned by getCoalescedEvents() and getPredictedEvents() retain their original target and offsetX/Y coordinates rather than adopting the container event's values. This inspector records a draw gesture, then replays it as untrusted events and shows exactly which target and offset values each approach produces.
Step 1: Draw in the left canvas
Record — draw here
Replay — untrusted PointerEvents
Event log
—Waiting for events…
Replay verdict: draw a gesture, then replay it to compare recorded and synthetic event offsets.
Chrome 130 behaviour
Trusted events
getCoalescedEvents() returns events with target and offsetX/Y adjusted to the container event's element — browser-native behaviour.
Untrusted events pre-130
Bug: JS-dispatched PointerEvents also adopted the container's target/offsetX/Y, discarding the original values set at construction.
Untrusted events Chrome 130
Fixed: JS-constructed PointerEvents preserve their original target and offsetX/Y values. Replay systems and testing frameworks get accurate coordinates.
Impact
Affects record/replay testing tools, drawing apps, gesture simulators, and accessibility tools that synthesise pointer events.
// Chrome 130: untrusted PointerEvents retain their original target/offset
// Construct an untrusted PointerEvent with specific offsetX/Y
const event = new PointerEvent('pointermove', {
bubbles: true,
clientX: 150,
clientY: 75,
// offsetX/offsetY set relative to the target element
});
// Dispatch on the original target element
targetElement.dispatchEvent(event);
// Chrome 130: event.target === targetElement ✓
// event.offsetX/Y preserved ✓
// getCoalescedEvents() on untrusted events
mainEvent.getCoalescedEvents().forEach(e => {
// Pre-130: e.target and e.offsetX/Y were overwritten by container
// Chrome 130: e.target === originalTarget ✓
// e.offsetX/Y preserved ✓
draw(e.offsetX, e.offsetY);
});