tor-browser

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

noopener-target.html (543B)


      1 <!DOCTYPE html>
      2 <script>
      3  var channelName = location.search.substr(1);
      4  var channel = new BroadcastChannel(channelName);
      5  channel.postMessage({ name: window.name,
      6                        haveOpener: window.opener !== null });
      7 
      8  // Because messages are not delivered synchronously and because closing a
      9  // browsing context prompts the eventual clearing of all task sources, this
     10  // document should not be closed until the opener document has confirmed
     11  // receipt.
     12  channel.onmessage = function() {
     13    window.close();
     14  };
     15 </script>