servo/tests/wpt/web-platform-tests/html/user-activation/resources/child-five.html

15 lines
699 B
HTML

<!DOCTYPE html>
<body style="background: red;">
<script>
window.parent.postMessage(JSON.stringify({"type": "child-five-loaded", "isActive": navigator.userActivation.isActive,
"hasBeenActive": navigator.userActivation.hasBeenActive}), "*");
window.addEventListener("message", event => {
if (event.source === window.parent && event.data == "report") {
window.parent.postMessage(JSON.stringify({"type": "child-five-report", "isActive": navigator.userActivation.isActive,
"hasBeenActive": navigator.userActivation.hasBeenActive}), "*");
}
});
</script>
</body>