tor-browser

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

sharedWorker_thirdparty_window.html (641B)


      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>Test for SharedWorker in 3rd Party Iframes</title>
      9 </head>
     10 <body>
     11  <script>
     12 
     13  let url = new URL(window.location);
     14 
     15  let frame = document.createElement('iframe');
     16  frame.src =
     17    'http://example.org/tests/dom/workers/test/sharedWorker_thirdparty_frame.html?name=' + url.searchParams.get('name');
     18  document.body.appendChild(frame);
     19  window.addEventListener('message', evt => {
     20    frame.remove();
     21    opener.postMessage(evt.data, "*");
     22  }, {once: true});
     23 
     24  </script>
     25 </body>
     26 </html>