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/dynamic-insertion-point-distribution-2.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/dynamic-insertion-point-distribution-2.html')
-rw-r--r-- | layout/reftests/webcomponents/dynamic-insertion-point-distribution-2.html | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/layout/reftests/webcomponents/dynamic-insertion-point-distribution-2.html b/layout/reftests/webcomponents/dynamic-insertion-point-distribution-2.html index d753af09c..c58b9cfbd 100644 --- a/layout/reftests/webcomponents/dynamic-insertion-point-distribution-2.html +++ b/layout/reftests/webcomponents/dynamic-insertion-point-distribution-2.html @@ -7,9 +7,11 @@ <script> var host, root; - host = document.getElementById("host"); - root = host.attachShadow({mode: 'open'}); - root.innerHTML = "<span>a</span>"; + function run() { + host = document.getElementById("host"); + root = host.createShadowRoot(); + root.innerHTML = "<span>a</span>"; + } function tweak() { var span = document.createElement("span"); @@ -22,7 +24,12 @@ document.documentElement.removeAttribute("class"); } - window.addEventListener("MozReftestInvalidate", tweak); + if (document.body.createShadowRoot) { + run(); + window.addEventListener("MozReftestInvalidate", tweak); + } else { + document.documentElement.className = ""; + } </script> </body> </html> |