summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/page-visibility/resources/unload-bubbles.html
blob: cc9e14f787190efb3dd16f434636a831fd57c18d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!doctype html>
<html>
<head><title>Document</title></head>
<body>
<h1>Document</h1>
<script>
window.addEventListener("load", function() {
  window.addEventListener("visibilitychange", event => {
    opener.postMessage({
                        target: event.target.nodeName,
                        state: document.visibilityState,
                        bubbles: event.bubbles
                      }, "*");
  });
  opener.postMessage("close", "*");
});
</script>
</body>
</html>