tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

service_worker_client.html (678B)


      1 <!--
      2  Any copyright is dedicated to the Public Domain.
      3  http://creativecommons.org/publicdomain/zero/1.0/
      4 -->
      5 <!DOCTYPE HTML>
      6 <html>
      7 <head>
      8 <title>controlled page</title>
      9 <script class="testbody" type="text/javascript">
     10  if (!parent) {
     11      info("service_worker_client.html should not be launched directly!");
     12  }
     13 
     14  window.onload = function() {
     15    navigator.serviceWorker.onmessage = function(msg) {
     16      // Forward messages coming from the service worker to the test page.
     17      parent.postMessage(msg.data, "*");
     18    };
     19    navigator.serviceWorker.ready.then(function(swr) {
     20      parent.postMessage("READY", "*");
     21    });
     22  }
     23 </script>
     24 
     25 </head>
     26 <body>
     27 </body>
     28 </html>