slot-fallback-content-007.html (910B)
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="Basic slot fallback content, when dynamically created"> 5 <title>Shadow DOM: Slots and fallback contents</title> 6 <link rel="match" href="slot-fallback-content-007-ref.html"> 7 8 <div id="host">FAIL 9 <slot id="slot1" name="slot1">FAIL</slot> 10 <slot id="slot2" name="slot2">SLOT2</slot> 11 <slot id="slot3" name="slot3"></slot> 12 <slot id="slot4" name="slot4"></slot> 13 14 <div id="A">FAIL</div> 15 <div id="B" slot="slot1">B</div> 16 <div id="C" slot="slot3">C</div> 17 <div id="D" slot="slot-DNE">FAIL</div> 18 <div id="E" slot="slot1">E</div> 19 <div id="F">FAIL</div> 20 </div> 21 22 <script> 23 const shadowRoot = host.attachShadow({ mode: "open" }); 24 shadowRoot.appendChild(slot1); 25 shadowRoot.appendChild(slot2); 26 shadowRoot.appendChild(slot3); 27 shadowRoot.appendChild(slot4); 28 29 </script>