OLD | NEW |
(Empty) | |
| 1 <script src="../../resources/dump-as-markup.js"></script> |
| 2 <div id="test" contenteditable> |
| 3 <ul> |
| 4 <li id="first">ABC</li> |
| 5 <li id="second">DEF</li> |
| 6 </ul> |
| 7 </div> |
| 8 <script> |
| 9 var selection = window.getSelection(); |
| 10 var range = document.createRange(); |
| 11 range.setStart(document.getElementById('first').firstChild, 2); |
| 12 range.setEnd(document.getElementById('second').firstChild, 3); |
| 13 selection.addRange(range); |
| 14 document.execCommand('InsertOrderedList', false, null); |
| 15 Markup.description("This tests verifies that the selection is properly reset aft
er executing the command."); |
| 16 Markup.dump('test'); |
| 17 </script> |
OLD | NEW |