diff options
Diffstat (limited to 'layout/reftests/webcomponents/dynamic-insertion-point-distribution-1.html')
-rw-r--r-- | layout/reftests/webcomponents/dynamic-insertion-point-distribution-1.html | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/layout/reftests/webcomponents/dynamic-insertion-point-distribution-1.html b/layout/reftests/webcomponents/dynamic-insertion-point-distribution-1.html index aefe84f25..8919a9c6a 100644 --- a/layout/reftests/webcomponents/dynamic-insertion-point-distribution-1.html +++ b/layout/reftests/webcomponents/dynamic-insertion-point-distribution-1.html @@ -7,9 +7,11 @@ <script> var host, root; - host = document.getElementById("host"); - root = host.attachShadow({mode: 'open'}); - root.innerHTML = 'a <slot></slot> c'; + function run() { + host = document.getElementById("host"); + root = host.createShadowRoot(); + root.innerHTML = 'a <content></content> c'; + } function tweak() { var span = document.createElement("span"); @@ -21,7 +23,12 @@ document.documentElement.removeAttribute("class"); } - window.addEventListener("MozReftestInvalidate", tweak); + if (document.body.createShadowRoot) { + run(); + window.addEventListener("MozReftestInvalidate", tweak, false); + } else { + document.documentElement.className = ""; + } </script> </body> </html> |