dynamic-insertion-point-distribution-2.html (694B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <head> 4 </head> 5 <body> 6 <div id="host"></div> 7 <script> 8 var host, root; 9 10 host = document.getElementById("host"); 11 root = host.attachShadow({mode: 'open'}); 12 root.innerHTML = "<span>a</span>"; 13 14 function tweak() { 15 var span = document.createElement("span"); 16 span.innerHTML = "b"; 17 18 // Span should not be visible because it is not distributed to any 19 // insertion points in the shadow DOM. 20 host.appendChild(span); 21 22 document.documentElement.removeAttribute("class"); 23 } 24 25 window.addEventListener("MozReftestInvalidate", tweak); 26 </script> 27 </body> 28 </html>