3 border: 1px solid #bbb;
6 <p>This tests selecting and deleting the paragraph before a table. You should see only a table in the editable region below, with the caret just before it.</p>
7 <div contenteditable="true">
10 <tr><td>1</td><td>2</td></tr>
13 <ul id="console"></ul>
17 var li = document.createElement("li");
18 var text = document.createTextNode(str);
19 var console = document.getElementById("console");
21 console.appendChild(li);
24 var sel = window.getSelection();
25 var table = document.getElementById("table");
26 var parent = table.parentNode;
27 if (parent.childNodes[3] != table)
28 log("Error: the table is not at index 3 of its parent.");
29 sel.collapse(parent, 3);
30 sel.modify("extend", "backward", "paragraph");
31 document.execCommand("Delete");