3 testRunner
.dumpEditingCallbacks();
5 <p>This tests for a bug when a selection is replaced by content with selectReplacement == true. Below, you should see 'A new link' and 'link' should be selected.
</p>
6 <div id=
"test" contenteditable=
"true">A new link
</div>
9 var s
= window
.getSelection();
10 var e
= document
.getElementById("test");
12 s
.setBaseAndExtent(e
.firstChild
, 6, e
.firstChild
, 10);
13 document
.execCommand("InsertHTML", false, "<a id='link' href='http://www.google.com'>link</a>");
14 e
= document
.getElementById("link");
15 s
.setBaseAndExtent(e
.firstChild
, 0, e
.firstChild
, 4);