Issue #1375 - Fix IsWebComponentsEnabled checks

This commit is contained in:
Matt A. Tobin 2020-04-17 07:43:40 -04:00 committed by Roy Tam
commit ca48752304
13 changed files with 154 additions and 137 deletions

View file

@ -7,15 +7,17 @@
<script>
function insertShadowSVG() {
var x = document.getElementById("x");
x.createShadowRoot();
x.shadowRoot.innerHTML =
'<svg width="50px" height="10px"> \
<switch> \
<foreignObject width="50px" height="50px"> \
<div style="width: 100px; height: 10px; background: red;"></div> \
</foreignObject> \
</switch> \
</svg>';
if (x.createShadowRoot) {
x.createShadowRoot();
x.shadowRoot.innerHTML =
'<svg width="50px" height="10px"> \
<switch> \
<foreignObject width="50px" height="50px"> \
<div style="width: 100px; height: 10px; background: red;"></div> \
</foreignObject> \
</switch> \
</svg>';
}
document.documentElement.removeAttribute("class");
}
window.addEventListener("MozReftestInvalidate", insertShadowSVG, false);