/**
* Test for Bug 974309
*
* Tests that editing a table row fails when the table or row is _not_ a child of a contenteditable node.
* See bug 857487 for tests that cover when the table or row _is_ a child of a contenteditable node.
*/
function getEditor() {
const Ci = SpecialPowers.Ci; var editingSession = SpecialPowers.wrap(window).docShell.editingSession;
return editingSession.getEditorForWindow(window).QueryInterface(Ci.nsITableEditor);
}
var cell = document.getElementById("cell");
cell.focus();
// place caret at end of center cell var sel = getSelection();
sel.collapse(cell, cell.childNodes.length);
vartable = document.getElementById("table");
var tableHTML = table.innerHTML;
var editor = getEditor();
editor.deleteTableRow(1);
is(table.innerHTML == tableHTML, true, "editor should not modify non-editable table" );
isnot(table.innerHTML == "\n <tbody>\n <tr>\n <td>a</td>\n <td>b</td>\n <td>c</td>\n </tr>\n \n <tr>\n <td>g</td>\n <td>h</td>\n <td>i</td>\n </tr>\n </tbody>\n ",
true, "editor.deleteTableRow(1) should not delete a non-editable row containing the selection");
</script>
</body>
</html>
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.26 Sekunden
(vorverarbeitet am 2026-04-29)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.