Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /pointerevents/pointerevent_pointerrawupdate_after_adoption_from_child.https.html - WPT Dashboard Interop Dashboard
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale:1">
<title>`pointerrawupdate` events should be fired after the element is moved from the parent doc to a child doc</title>
<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>
<script>
"use strict";
addEventListener("load", () => {
promise_test(async () => {
const iframe = document.querySelector("iframe");
const div = iframe.contentDocument.createElement("div");
div.style.width = "100px";
div.style.height = "100px";
iframe.contentDocument.body.appendChild(div);
let pointerrawupdateEvent;
div.addEventListener(
"pointerrawupdate",
event => pointerrawupdateEvent = event,
{once: true}
);
document.body.appendChild(div);
div.getBoundingClientRect();
await new test_driver.Actions()
.pointerMove(0, 0, {origin: div})
.pointerMove(1, 1, {origin: div})
.send();
assert_true(pointerrawupdateEvent !== undefined);
});
}, {once: true});
</script>
</head>
<body>
<iframe srcdoc=""></iframe>
</body>
</html>