5 testRunner
.dumpEditingCallbacks();
9 <script src=../editing.js
language=
"JavaScript" type=
"text/JavaScript" ></script>
14 var selection
= window
.getSelection();
15 var e
= document
.getElementById("test");
16 var r
= document
.getElementById("removeme");
18 selection
.setBaseAndExtent(e
, 0, r
.childNodes
[0], 2);
20 r
.parentNode
.removeChild(r
);
25 <title>Removing the endpoints of a selection
</title>
28 <p>This tests behavior when a node that serves as the start or end of a selection is removed from the document. Ideally, we would just adjust the selection when an endpoint is removed, for now, we just blow away the selection.
</p>
29 <p>This test creates a selection that ends inside of a node that will be removed. Then the node is removed. There should be no selection afterward.
</p>
31 hello
<span style=
"color:red;" id=
"removeme">removeme
</span> world!
34 <script>runTest()</script>