dynamic-insertion-point-distribution-1.html (653B)
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 = 'a <slot></slot> c'; 13 14 function tweak() { 15 var span = document.createElement("span"); 16 span.innerHTML = "b"; 17 18 // Span should be distributed to insertion point between 'a' and 'c'. 19 host.appendChild(span); 20 21 document.documentElement.removeAttribute("class"); 22 } 23 24 window.addEventListener("MozReftestInvalidate", tweak); 25 </script> 26 </body> 27 </html>