tor-browser

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

layout-slot-no-longer-assigned.html (555B)


      1 <!DOCTYPE html>
      2 <title>Layout using slot elements</title>
      3 <link rel="author" title="Hayato Ito" href="mailto:hayato@google.com"/>
      4 <link rel="help" href="https://dom.spec.whatwg.org/#shadow-tree-slots">
      5 <link rel="match" href="reference/empty.html"/>
      6 <div id="host"></div>
      7 <script>
      8 const host = document.querySelector('#host');
      9 const sr = host.attachShadow({ mode: 'open' });
     10 sr.innerHTML = '<slot name=s1></slot>'
     11 host.innerHTML = '<div id=d1 slot=s1></div>';
     12 
     13 document.body.offsetLeft;
     14 document.querySelector('#d1').setAttribute('slot', 's2');
     15 </script>