/**
* 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 \n
\n
a
\n
b
\n
c
\n
\n \n
\n
g
\n
h
\n
i
\n
\n \n ",
true, "editor.deleteTableRow(1) should not delete a non-editable row containing the selection");
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.