2 <script src=
"../../../resources/testharness.js"></script>
3 <script src=
"../../../resources/testharnessreport.js"></script>
4 <div id=
"sample"></div>
8 var sample
= document
.getElementById('sample');
9 var range
= document
.createRange();
10 range
.setStart(sample
, 0);
11 range
.setEnd(sample
, 0);
12 sample
.addEventListener('DOMNodeRemoved', function() {
16 document
.implementation
.createDocument('', null).appendChild(sample
);
19 var doc
= document
.implementation
.createDocument('http://www.w3.org/1999/xhtml', 'html');
21 doc
.documentElement
.appendChild(sample
);
23 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?');