summaryrefslogtreecommitdiffstats
path: root/docshell/test/navigation/file_bug1583110.html
blob: 5b08f54d2195f6530383facf80744d34fea80ec4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<html>
  <head>
    <script>
    var bc;
    window.onpageshow = function(pageshow) {
      bc = new BroadcastChannel("bug1583110");
      bc.onmessage = function(event) {
        bc.close();
        if (event.data == "loadnext") {
          location.search = "?nextpage";
        } else if (event.data == "back") {
          history.back();
        }
      }
      bc.postMessage({type: "pageshow", persisted: pageshow.persisted });
      if (pageshow.persisted) {
        document.body.appendChild(document.createElement("iframe"));
        bc.close();
        window.close();
      }
    }
    </script>
  </head>
  <body>
  </body>
</html>