fragid-shadow-2.html (509B)
1 <!doctype html> 2 <div id="host"></div> 3 <script> 4 // Test dynamic id changes inside the shadow root. 5 host.attachShadow({ mode: "open" }).innerHTML = ` 6 <svg width="100" height="100"> 7 <defs> 8 <pattern id="rect1" width="100" height="100"> 9 <rect fill="lime" width="100" height="100" /> 10 </pattern> 11 </defs> 12 <rect fill="url(#rect)" width="100" height="100" /> 13 </svg> 14 `; 15 document.body.offsetTop; 16 host.shadowRoot.getElementById("rect1").id = "rect"; 17 </script>