29 lines
989 B
HTML
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>
|