1
0
Fork 0
firefox/testing/web-platform/tests/html/user-activation/resources/child-two.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

29 lines
989 B
HTML

<!DOCTYPE html>
<body style="background: lightgrey;">
<script>
window.top.postMessage(JSON.stringify({
"type": "child-two-loaded",
"isActive": navigator.userActivation.isActive,
"hasBeenActive": navigator.userActivation.hasBeenActive
}), "*");
window.addEventListener("click", event => {
window.top.postMessage(JSON.stringify({
"type": "child-two-clicked",
"isActive": navigator.userActivation.isActive,
"hasBeenActive": navigator.userActivation.hasBeenActive
}), "*");
});
window.addEventListener("message", event => {
var msg = JSON.parse(event.data);
if (msg.type == "report") {
window.top.postMessage(JSON.stringify({
"type": "child-two-report",
"isActive": navigator.userActivation.isActive,
"hasBeenActive": navigator.userActivation.hasBeenActive
}), "*");
}
});
</script>
</body>