tor-browser

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

nested-cross-origin-child-iframe.sub.html (679B)


      1 <!DOCTYPE html>
      2 <script src="/common/get-host-info.sub.js"></script>
      3 <script src="/css/cssom-view/support/scroll-behavior.js"></script>
      4 <style>
      5 .spacer {
      6  height: calc(100vh + 100px);
      7 }
      8 </style>
      9 <div class="spacer"></div>
     10 <iframe id="iframe"></iframe>
     11 <script>
     12 iframe.src =      // secure port
     13  get_host_info().HTTPS_NOTSAMESITE_ORIGIN + "/intersection-observer/resources/nested-cross-origin-grand-child-iframe.html";
     14 
     15 window.addEventListener("message", async event => {
     16  if (event.data == "scroll") {
     17    iframe.scrollIntoView({ behavior: "instant" });
     18    await waitForScrollEnd(document.scrollingElement);
     19    window.parent.postMessage("scrollEnd", "*");
     20  }
     21 });
     22 </script>