blob: e87e8b7cf8d54d13ab811afa399ba91991f905a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
<script>
function editingTest() {
var selection = window.getSelection();
var s = document.getElementById("start");
selection.collapse(s, 0);
execMoveSelectionForwardByCharacterCommand();
for (i = 0; i < 2; i++) {
deleteCommand();
}
}
</script>
<div contenteditable="true" id="test">
<div>Before</div>
<hr>
<span id="start">after</span>
</div>
<script>
runEditingTest();
</script>
|