canvas.addEventListener("pointerrawupdate", (event) => {
const events = event.getCoalescedEvents();
if (events.length > 1) {
console.log("Coalesced events:", events.length);
for (const coalescedEvent of events) {
// Do something with the coalesced events.
}
} else {
// Do something with the event.
console.log("Raw event", event);
}
});Element: pointerrawupdate event / notebook
Element: pointerrawupdate event
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.