diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 07:43:40 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 07:43:40 -0400 |
commit | 80c024779929d44397a8c03d2fa7808f97f2c21a (patch) | |
tree | e961240621bd07d87e8a45e3006da7c02c890306 /layout/reftests/webcomponents/update-dist-node-descendants-1.html | |
parent | 6d76ab9b6c19d0829c343e1bc3cd7865221d64ba (diff) | |
download | UXP-80c024779929d44397a8c03d2fa7808f97f2c21a.tar UXP-80c024779929d44397a8c03d2fa7808f97f2c21a.tar.gz UXP-80c024779929d44397a8c03d2fa7808f97f2c21a.tar.lz UXP-80c024779929d44397a8c03d2fa7808f97f2c21a.tar.xz UXP-80c024779929d44397a8c03d2fa7808f97f2c21a.zip |
Issue #1375 - Fix IsWebComponentsEnabled checks
Diffstat (limited to 'layout/reftests/webcomponents/update-dist-node-descendants-1.html')
-rw-r--r-- | layout/reftests/webcomponents/update-dist-node-descendants-1.html | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/layout/reftests/webcomponents/update-dist-node-descendants-1.html b/layout/reftests/webcomponents/update-dist-node-descendants-1.html index 003c23394..3ba96594b 100644 --- a/layout/reftests/webcomponents/update-dist-node-descendants-1.html +++ b/layout/reftests/webcomponents/update-dist-node-descendants-1.html @@ -6,8 +6,10 @@ <div id="outer"><span id="distnode">text</span></div> <script> - var shadowRoot = document.getElementById('outer').attachShadow({mode: 'open'}); - shadowRoot.innerHTML = '<div><slot></slot></div>'; +function run() { + var shadowRoot = document.getElementById('outer').createShadowRoot(); + shadowRoot.innerHTML = '<div><content></content></div>'; +} function tweak() { var distNode = document.getElementById("distnode"); @@ -16,7 +18,12 @@ document.documentElement.removeAttribute("class"); } +if (document.body.createShadowRoot) { + run(); window.addEventListener("MozReftestInvalidate", tweak); +} else { + document.documentElement.className = ""; +} </script> </body> </html> |