Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- Manifest: dom/base/test/mochitest.toml
<!DOCTYPE HTML>
<html>
<!--
-->
<head>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<script class="testbody" type="text/javascript">
SimpleTest.waitForExplicitFinish();
function observeTest(mutationsList) {
for (let mutation of mutationsList) {
for (let n of mutation.addedNodes) {
if (n.id === 'content') {
is(n.innerHTML.trim(), "<script><\/script>", "Comment should not have been observed.");
SimpleTest.finish();
}
}
}
}
var observer = new MutationObserver(observeTest);
observer.observe(document.body, { childList: true, subtree: true });
</script>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1784187">Mozilla Bug 1784187</a>
<p id="display"></p>
<div id="content" style="display: none">
<script></script>
<!-- Test comment that shouldn't be observed -->
</div>
</body>
</html>