// Try to remove the last character from the end of the <blockquote>
selection.collapse(blockquote, blockquote.childNodes.length); var range = selection.getRangeAt(0);
ok(range.collapsed, "range should be collapsed at the end of <blockquote>");
is(range.startContainer, blockquote, "range should be collapsed in the <blockquote>");
is(range.startOffset, blockquote.childNodes.length, "range should be collapsed at the end");
synthesizeKey("KEY_Backspace");
is(blockquote.innerHTML, "<p>ab</p>", "Pressing Backspace key at the end of <blockquote> should remove the last character in the <p>");
// Try to remove the first character from the start of the <blockquote>
selection.collapse(blockquote, 0);
range = selection.getRangeAt(0);
ok(range.collapsed, "range should be collapsed at the start of <blockquote>");
is(range.startContainer, blockquote, "range should be collapsed in the <blockquote>");
is(range.startOffset, 0, "range should be collapsed at the start");
synthesizeKey("KEY_Delete");
// FIXME: Chrome does not unwrap <p> if and only if the deleting range starts
// immediately after a block boundary.
is(blockquote.innerHTML, "b", "Pressing Delete key at the start of <blockquote> should remove the first character in the <p>");
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.