fragid-shadow-6.html (710B)
1 <!doctype html> 2 <svg style="position: absolute; width: 0; height: 0"> 3 <defs> 4 <pattern id="rect" width="100" height="100"> 5 <rect fill="red" width="100" height="100" /> 6 </pattern> 7 </defs> 8 </svg> 9 <div id="host"></div> 10 <script> 11 // Should peek the pattern from the shadow root (green), not from the document (red), 12 // even though the uri is absolute. 13 host.attachShadow({ mode: "open" }).innerHTML = ` 14 <svg width="100" height="100"> 15 <defs> 16 <pattern id="rect" width="100" height="100"> 17 <rect fill="lime" width="100" height="100" /> 18 </pattern> 19 </defs> 20 <rect fill="url(${location.href}#rect)" width="100" height="100" /> 21 </svg> 22 `; 23 </script>