tor-browser

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

https-subframe-shared.html (1029B)


      1 <!DOCTYPE html>
      2 <script>
      3  try {
      4    var w = new SharedWorker("shared-worker-script.js");
      5    w.port.onmessage = function(e) {
      6      parent.postMessage({ type: "shared", error: false, exception: false,
      7                           isSecureContext: e.data }, "*");
      8    };
      9    w.onerror = function(e) {
     10      parent.postMessage({ type: "shared", error: true, exception: false },
     11                         "*");
     12    }
     13    w.port.start();
     14  } catch (e) {
     15    parent.postMessage({ type: "shared", exception: true }, "*");
     16  }
     17 
     18  try {
     19    var w = new SharedWorker("parent-shared-worker-script.js");
     20    w.port.onmessage = function(e) {
     21      parent.postMessage({ type: "nested", error: false, exception: false,
     22                           isSecureContext: e.data }, "*");
     23    };
     24    w.onerror = function(e) {
     25      parent.postMessage({ type: "nested", error: true, exception: false },
     26                         "*");
     27    }
     28    w.port.start();
     29  } catch (e) {
     30    parent.postMessage({ type: "nested", exception: true }, "*");
     31  }
     32 </script>