blob: 6e2b2f14d51ba4f7ab15992f5ae18612fc3f7794 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<div id="sample"></div>
<div id="log"></div>
var moved = false;
var sample = document.getElementById('sample');
var range = document.createRange();
range.setStart(sample, 0);
range.setEnd(sample, 0);
sample.addEventListener('DOMNodeRemoved', function() {
if (moved)
moved = true;
document.implementation.createDocument('', null).appendChild(sample);
test(function() {
var doc = document.implementation.createDocument('', 'html');
try {
} catch (exception) {
assert_equals(exception.toString(), 'NotFoundError: Failed to execute \'appendChild\' on \'Node\': The node to be removed is no longer a child of this node. Perhaps it was moved in response to a mutation?');