OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <body> |
| 3 <script src="../../js/resources/js-test-pre.js"></script> |
| 4 <div id="parent1">text</div> |
| 5 <script> |
| 6 var parent = document.getElementById('parent1'); |
| 7 var target = parent.firstChild; |
| 8 |
| 9 function handleInsertion() { |
| 10 document.removeEventListener('DOMNodeInserted', handleInsertion); |
| 11 target.nextSibling.remove(); |
| 12 } |
| 13 |
| 14 document.addEventListener('DOMNodeInserted', handleInsertion, false); |
| 15 var r = new Range(); |
| 16 //window.getSelection().addRange(r); |
| 17 r.setStart(target, 0); |
| 18 r.setEnd(target, 4); |
| 19 target.splitText(2); |
| 20 description('No assertion failures even if an DOM mutation event handler updates
the new node created by Text::splitText.'); |
| 21 testPassed(' if the test wasn\'t terminated by an assertion.'); |
| 22 parent.remove(); |
| 23 </script> |
| 24 <script src="../../js/resources/js-test-post.js"></script> |
| 25 </body> |
OLD | NEW |