tor-browser

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

network-partition-worker-checker.html (1081B)


      1 <!doctype html>
      2 <html>
      3 <head>
      4  <meta charset="utf-8">
      5  <title>Worker Network Partition Checker</title>
      6  <meta name="help" href="https://fetch.spec.whatwg.org/#network-partition-keys">
      7  <meta name="timeout" content="normal">
      8  <script src="SUBRESOURCE_PREFIX:&dispatch=fetch_file&path=common/utils.js"></script>
      9  <script src="SUBRESOURCE_PREFIX:&dispatch=fetch_file&path=resources/testharness.js"></script>
     10  <script src="SUBRESOURCE_PREFIX:&dispatch=fetch_file&path=fetch/connection-pool/resources/network-partition-key.js"></script>
     11 </head>
     12 <body>
     13 <script>
     14    // Workers must be same origin as the page loading them, but it's simpler to reuse the
     15    // OTHER_PREFIX mechanism in the Python code than to craft the URL in Javascript here.
     16    var worker = new Worker('OTHER_PREFIX:&dispatch=fetch_file&path=fetch/connection-pool/resources/network-partition-worker.js');
     17    function message_listener(event) {
     18      window.opener.postMessage(event.data, '*');
     19      worker.terminate();
     20    }
     21    worker.addEventListener('message', message_listener);
     22 </script>
     23 </body>
     24 </html>