OLD | NEW |
| (Empty) |
1 <html contenteditable="true" id="test"> | |
2 <script> | |
3 if (window.testRunner) | |
4 testRunner.dumpEditingCallbacks(); | |
5 </script> | |
6 | |
7 <script> | |
8 function runTest() { | |
9 var s = window.getSelection(); | |
10 var e = document.getElementById("test"); | |
11 | |
12 e.focus(); | |
13 document.execCommand("InsertText", false, "\t"); | |
14 document.execCommand("InsertText", false, "This tests to see where the selec
tion is set when an html element is focused."); | |
15 document.execCommand("InsertHTML", false, "<br>We set it inside the body bec
ause we don't want to allow editing outside the body. This test also does some
editing to make sure it happens in the body."); | |
16 } | |
17 </script> | |
18 <body onLoad="runTest();"> | |
19 </body> | |
20 </html> | |
OLD | NEW |