tor-browser

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

stylesheets-nested-iframes.html (688B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <meta charset="utf-8">
      5  <title>StyleSheetsActor iframe test</title>
      6  <style>
      7    p {
      8      padding: 1em;
      9    }
     10  </style>
     11 </head>
     12 <body>
     13  <p>A test page with nested iframes</p>
     14  <iframe></iframe>
     15  <script type="application/javascript">
     16    "use strict";
     17 
     18    const iframe = document.querySelector("iframe");
     19    let i = parseInt(location.href.split("?")[1], 10) || 1;
     20 
     21    // The frame can't have the same src URL as any of its ancestors.
     22    // This will not infinitely recurse because a frame won't get a content
     23    // document once it's nested deeply enough.
     24    iframe.src = location.href.split("?")[0] + "?" + (++i);
     25  </script>
     26 </body>
     27 </html>