Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html>
<!--
-->
<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>