4 sel
= window
.getSelection();
5 start
= document
.getElementById("test" + num
+ "start");
6 end
= document
.getElementById("test" + num
+ "end");
7 sel
.setBaseAndExtent(start
, 0, end
, end
.childNodes
.length
);
8 document
.execCommand("Delete");
12 <p>This empties a row (the second). It should be removed.
<b>This demonstrates a bug: the two cells that contained the ends of the selection aren't given a placeholder and so appear differently than the other emptied cells.
</b></p>
13 <div contenteditable=
"true">
15 <tr><td>1</td><td id=
"test1start">2</td><td>3</td></tr>
16 <tr><td>4</td><td>5</td><td>6</td></tr>
17 <tr><td>7</td><td id=
"test1end">8</td><td>9</td></tr>
21 <script>runTest(1);</script>
24 <p>This empties a row (the second), but it still contains the selection and so shouldn't be removed.
</p>
25 <div contenteditable=
"true">
27 <tr><td>1</td><td>2</td><td>3</td></tr>
28 <tr><td id=
"test2start">4</td><td>5</td><td id=
"test2end">6</td></tr>
29 <tr><td>7</td><td>8</td><td>9</td></tr>
33 <script>runTest(2);</script>
35 <p>This empties the first row, it should be removed.
</p>
36 <div contenteditable=
"true">
37 <div>Hello
<span id=
"test3start">world!
</span></div>
39 <tr><td>1</td><td>2</td><td>3</td></tr>
40 <tr><td>4</td><td id=
"test3end">5</td><td>6</td></tr>
41 <tr><td>7</td><td>8</td><td>9</td></tr>
45 <script>runTest(3);</script>