<!DOCTYPE HTML> <html class="reftest-wait"> <head> </head> <body> <div id="outer"><span id="distnode">text</span></div> <script> function run() { var shadowRoot = document.getElementById('outer').createShadowRoot(); shadowRoot.innerHTML = '<div><content></content></div>'; } function tweak() { var distNode = document.getElementById("distnode"); distNode.textContent = "Hello World"; document.documentElement.removeAttribute("class"); } if (document.body.createShadowRoot) { run(); window.addEventListener("MozReftestInvalidate", tweak); } else { document.documentElement.className = ""; } </script> </body> </html>