tor-browser

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

consumption-sameorigin-child.html (896B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4  <script>
      5    window.top.postMessage(JSON.stringify({
      6        "type": "child-sameorigin-loaded",
      7        "isActive": navigator.userActivation.isActive,
      8        "hasBeenActive": navigator.userActivation.hasBeenActive
      9    }), "*");
     10 
     11    window.addEventListener("click", event => {
     12        window.open().close();
     13 
     14        window.top.postMessage(JSON.stringify({
     15            "type": "child-sameorigin-report",
     16            "isActive": navigator.userActivation.isActive,
     17            "hasBeenActive": navigator.userActivation.hasBeenActive
     18        }), "*");
     19    });
     20  </script>
     21 </head>
     22 <body style="background: lightgreen;">
     23  <!-- The midpoint of this frame should be outside the grandchild frame. -->
     24  <div style="height: 75px;">Same-origin child frame</div>
     25  <iframe id="child2" width="270px" height="30px"
     26          src="child-two.html">
     27  </iframe>
     28 </body>
     29 </html>