tor-browser

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

shadow-reassign-dynamic-006.html (757B)


      1 <!doctype html>
      2 <meta charset="utf-8">
      3 <title>CSS Scoping: Dynamic reassignment of a named slot child.</title>
      4 <link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
      5 <link rel="help" href="https://drafts.csswg.org/css-scoping/#selectors-data-model">
      6 <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1927714">
      7 <link rel="match" href="shadow-reassign-dynamic-006-ref.html">
      8 <div id="host">
      9  <template shadowrootmode="open">
     10    <slot></slot>
     11    <slot></slot>
     12  </template>
     13  <div id="child1">Child1</div>
     14  <div id="child2" slot="named-slot">Child2</div>
     15 </div>
     16 <script>
     17  host.getBoundingClientRect();
     18  host.shadowRoot.querySelectorAll("slot")[1].name = "named-slot";
     19  host.getBoundingClientRect();
     20 </script>