use-element-class-selector.html (701B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <title>SVG Test: Class change in template affects class selector matching in <use> element tree</title> 4 <link rel="help" href="https://svgwg.org/svg2-draft/struct.html#UseElement"> 5 <link rel="match" href="use-element-selector-ref.html"> 6 <style> 7 .class > #rect { fill: green; } 8 </style> 9 <svg> 10 <use id="use_elm" xlink:href="#tmpl" /> 11 <defs> 12 <g id="tmpl"> 13 <rect id="rect" width="100" height="100"></rect> 14 </g> 15 </defs> 16 </svg> 17 <script> 18 requestAnimationFrame(() => { 19 requestAnimationFrame(() => { 20 tmpl.setAttribute("class", "class"); 21 document.documentElement.classList.remove('reftest-wait'); 22 }); 23 }); 24 </script>