Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /dom/events/pointer-event-document-move.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<template>
<p>TEST</p>
</template>
<body>
<script>
const clone = document.querySelector("template").content.cloneNode(true);
const p = clone.querySelector("p");
let gotEvent = false;
p.addEventListener("pointerup", () => {
gotEvent = true;
});
document.body.append(clone);
promise_test(async () => {
await test_driver.click(document.querySelector("p"));
assert_true(gotEvent);
}, "Moving a node to new document should move the registered event listeners together");
</script>