blob: fddde18d1bcdb31bd7eefba2eedb4ad87b4c9b4c [file] [log] [blame]
<!DOCTYPE>
<body>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<div>
<p id="parent">bar</p>
<span id="test-title">title</span>
</div>
<script>
test(() => {
var parent = document.querySelector('#parent');
var test_title = document.querySelector('#test-title');
// This function is called recursively.
function tCF_custom_1() {
var doc = document.implementation.createDocument('http://www.w3.org/1999/xhtml', 'html');
doc.adoptNode(parent);
parent.appendChild(test_title);
}
parent.addEventListener('DOMSubtreeModified', tCF_custom_1, false);
parent.appendChild(test_title);
}, 'Adopting parent node in DOMSubtreeModified event handler should not cause a crash.');
</script>
</body>