mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 01:08:39 +09:00
Issue #1375 - Fix IsWebComponentsEnabled checks
This commit is contained in:
parent
a6f048fc42
commit
ca48752304
13 changed files with 154 additions and 137 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue