Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<!-- DO NOT PUT any text before the test target to avoid fractional coordinates! -->
<div id="target" style="width: 100px; height: 50px; background: green"></div>
<script>
// Retain every "pointermove" event after asking for its coalesced events,
// like pointer-sampling scripts on real pages do.
window.events = [];
window.coalescedEventCount = 0;
document.addEventListener("pointermove", event => {
window.coalescedEventCount = event.getCoalescedEvents().length;
window.events.push(event);
});
</script>
</body>
</html>