1
0
Fork 0
firefox/dom/tests/mochitest/webcomponents/test_declarative_shadowdom_reentry.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

27 lines
924 B
HTML

<!DOCTYPE html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1870055
-->
<head>
<title>Test for Logging of Declarative ShadowDOM attachment failure</title>
<script type="text/javascript" src="head.js"></script>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<script>
SimpleTest.waitForExplicitFinish();
document.addEventListener('DOMContentLoaded', async () => {
SpecialPowers.pushPrefEnv({"set": [["dom.mutation_events.enabled", true]]}, () => {
const node = document.createElement('div');
document.documentElement.appendChild(node);
document.addEventListener('DOMSubtreeModified', (e) => {
node.setHTMLUnsafe('b');
is(node.textContent, 'b', 'Re-entry into setHTMLUnsafe is valid');
SimpleTest.finish();
}, { once: true });
node.setHTMLUnsafe('a');
});
});
</script>