1066554-1.html (775B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <meta charset="utf-8"> 4 <title>Test for bug 1066554 - Shadow DOM loads SVG stylesheets as needed</title> 5 <body> 6 <div id="x"></div> 7 <script> 8 function insertShadowSVG() { 9 var x = document.getElementById("x"); 10 x.attachShadow({ mode: "open" }); 11 x.shadowRoot.innerHTML = 12 '<svg width="50px" height="10px"> \ 13 <switch> \ 14 <foreignObject width="50px" height="50px"> \ 15 <div style="width: 100px; height: 10px; background: red;"></div> \ 16 </foreignObject> \ 17 </switch> \ 18 </svg>'; 19 document.documentElement.removeAttribute("class"); 20 } 21 window.addEventListener("MozReftestInvalidate", insertShadowSVG); 22 </script> 23 </body> 24 </html>