3 <div id="sample" contenteditable="true">
5 <div id="test" style="font-weight:bold">bar</div>
10 testRunner.dumpAsText();
11 function $(id) { return document.getElementById(id); }
12 window.getSelection().collapse($('test'), 0);
13 document.execCommand('Delete');
14 var sample = $('sample');
15 sample.addEventListener('DOMSubtreeModified', function () {
16 // Move nodes being processed by 'InsertText' to another document.
17 var anotherDoc = document.implementation.createDocument('', null);
18 anotherDoc.adoptNode(sample);
20 document.execCommand('InsertText', false, 'ab123cd');
21 document.body.textContent = 'PASS; NOT CRASHED';