update-dist-node-descendants-1.html 645 B

123456789101112131415161718192021222324252627282930
  1. <!DOCTYPE HTML>
  2. <html class="reftest-wait">
  3. <head>
  4. </head>
  5. <body>
  6. <div id="outer"><span id="distnode">text</span></div>
  7. <script>
  8. function run() {
  9. var shadowRoot = document.getElementById('outer').createShadowRoot();
  10. shadowRoot.innerHTML = '<div><content></content></div>';
  11. }
  12. function tweak() {
  13. var distNode = document.getElementById("distnode");
  14. distNode.textContent = "Hello World";
  15. document.documentElement.removeAttribute("class");
  16. }
  17. if (document.body.createShadowRoot) {
  18. run();
  19. window.addEventListener("MozReftestInvalidate", tweak);
  20. } else {
  21. document.documentElement.className = "";
  22. }
  23. </script>
  24. </body>
  25. </html>