fragid-shadow-7.html (826B)
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 // Test references from a <svg:use> subtree. 12 host.attachShadow({ mode: "open" }).innerHTML = ` 13 <svg width="100" height="100"> 14 <defs> 15 <pattern id="rect" width="100" height="100"> 16 <rect fill="red" width="100" height="100" /> 17 </pattern> 18 <symbol id="useme"> 19 <pattern id="rect" width="100" height="100"> 20 <rect fill="lime" width="100" height="100" /> 21 </pattern> 22 <rect fill="url(#rect)" width="100" height="100" /> 23 </symbol> 24 </defs> 25 <use href="#useme" /> 26 </svg> 27 `; 28 </script>