tor-browser

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

file_top_navigation_by_user_activation.html (701B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <title>Test window for top navigation with user activation</title>
      6 <script>
      7 window.onload = () => {
      8  opener.postMessage("READY", "*");
      9 };
     10 
     11 window.onhashchange = () => {
     12  opener.postMessage("NAVIGATED", "*");
     13 };
     14 
     15 window.onmessage = (e) => {
     16  if (e.data == "CLICK" || e.data == "SCRIPT") {
     17    frames[0].postMessage([e.data, location.href + "#hash"], "*");
     18  } else {
     19    opener.postMessage(e.data, "*");
     20  }
     21 };
     22 </script>
     23 </head>
     24 <body>
     25  <iframe sandbox="allow-scripts allow-top-navigation-by-user-activation" src="http://example.org/tests/docshell/test/iframesandbox/file_top_navigation_by_user_activation_iframe.html"></iframe>
     26 </body>
     27 </html>