ff87eed79b1c6a69738a875636f44e3e5ea64d93
[WebKit-https.git] / LayoutTests / editing / inserting / before-after-input-element.html
1 <p>This tests text insertion before/after an input element.</p>
2 <div id="div" contenteditable="true"><input type="text"></div>
3
4 <script>
5 var div = document.getElementById("div");
6 var sel = window.getSelection();
7 sel.setPosition(div, 0);
8
9 document.execCommand("InsertText", false, "Hello");
10 sel.setPosition(div, div.childNodes.length);
11
12 document.execCommand("InsertText", false, "World");
13 </script>