1439016.html (506B)
1 <!DOCTYPE html> 2 <div id="host"> 3 <div slot="slot1">content</div> 4 </div> 5 <script> 6 // NOTE(emilio): the failure mode for this crashtest is asserting whenever the 7 // shell goes away. 8 let shadowRoot = document.querySelector('#host').attachShadow({ mode: 'open' }); 9 shadowRoot.innerHTML = ` 10 <div id="slot1-container"> 11 <slot id="slot1" name="slot1"></slot> 12 <button id="button1">Click here</button> 13 </div> 14 `; 15 16 document.body.offsetTop; 17 shadowRoot.querySelector('#slot1-container').remove(); 18 </script>