tor-browser

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

1681729.html (897B)


      1 <html class="reftest-wait">
      2 <head>
      3 <script>
      4  async function test() {
      5    // We need to go through the event loop first, so we're running this from 
      6    // a timeout set from the load event. If we were adding a load from the load
      7    // event directly we'd just replace the iframe's session history entry
      8    // instead of cloning it (and replacing its children).
      9    let frame = document.getElementById("frame");
     10 
     11    let p = new Promise((r) => {
     12      frame.addEventListener("load", r, { once: true });
     13    });
     14    frame.src = "1681729-inner2.html";
     15    await p;
     16 
     17    p = new Promise((r) => {
     18      frame.contentWindow.addEventListener("pageshow", r, { once: true });
     19    });
     20    history.back();
     21    await p;
     22 
     23    document.documentElement.removeAttribute("class");
     24  }
     25 </script>
     26 </head>
     27 <body onload="setTimeout(test, 0);">
     28 <iframe id="frame" src="1681729-inner1.html"></iframe>
     29 </body>
     30 </html>