tor-browser

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

slot-fallback-content-002.html (728B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8" >
      3 <meta name="author" title="Di Zhang" href="mailto:dizhangg@chromium.org">
      4 <meta name="assert" content="Assigned nodes overwrite fallback contents of slots, when dynamically created.">
      5 <title>Shadow DOM: Slots and fallback contents</title>
      6 <link rel="match" href="slot-fallback-content-002-ref.html">
      7 
      8 <p>Test passes if there are two lines of text "A", "B" below.</p>
      9 
     10 <div id="host">
     11  <slot id="slot1" name="slot1">FAIL</slot>
     12  <slot id="slot2" name="slot2">FAIL</slot>
     13  <div id="A" slot="slot1">A</div>
     14  <div id="B" slot="slot2">B</div>
     15 </div>
     16 
     17 <script>
     18 const shadowRoot = host.attachShadow({ mode: "open" });
     19 shadowRoot.appendChild(slot1);
     20 shadowRoot.appendChild(slot2);
     21 
     22 </script>