summaryrefslogtreecommitdiffstats
path: root/dom/workers/test/navigate.html
blob: e38ab4540a1c427b3670b22bf8daf8435f778bfc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
<!DOCTYPE HTML>
<script>
  var bc = new BroadcastChannel("navigate");
  bc.onmessage = (event) => {
    if (event.data.command == "navigate") {
      window.location = event.data.location;
      bc.close();
    }
  }
  window.onload = () => {
    bc.postMessage({command: "loaded"});
  }
</script>