<script> | |
if (window.layoutTestController) | |
layoutTestController.dumpEditingCallbacks(); | |
</script> | |
<div id="test" contenteditable="true">There be no line breaks in this sentence.</div> | |
<script> | |
var sel = window.getSelection(); | |
var e = document.getElementById("test").firstChild; | |
sel.setPosition(e, 0); | |
sel.modify("move", "forward", "word"); | |
sel.modify("move", "forward", "character"); | |
document.execCommand("InsertHTML", false, "<div>should</div>"); | |
</script> |