tor-browser

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

remove-from-shadow-host-and-adopt-into-iframe.html (930B)


      1 <!doctype html>
      2 <html class="reftest-wait">
      3  <head>
      4    <title>Adopting a shadow host child into an iframe</title>
      5    <link rel="help" href="https://dom.spec.whatwg.org/#concept-node-adopt">
      6    <link rel="match" href="remove-from-shadow-host-and-adopt-into-iframe-ref.html">
      7    <style>
      8      iframe { border: 0; }
      9    </style>
     10    <script src="/common/reftest-wait.js"></script>
     11    <script>
     12      onload = () => {
     13        const root = host.attachShadow({mode:"open"});
     14        root.innerHTML = "<slot>";
     15        // force a layout
     16        host.offsetTop;
     17        iframe.contentWindow.document.body.style.margin = 0;
     18        iframe.contentWindow.document.body.appendChild(adopted);
     19        host.remove();
     20        takeScreenshot();
     21      }
     22    </script>
     23  </head>
     24  <body>
     25    <p>You should see the word PASS below.</p>
     26    <iframe id="iframe"></iframe>
     27    <div id="host"><span id="adopted">PASS</span></div>
     28  </body>
     29 </html>