// 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
"
);
is(range.startContainer, blockquote, "range should be collapsed in the
"
);
is(range.startOffset, blockquote.childNodes.length, "range should be collapsed at the end");
synthesizeKey("KEY_Backspace");
is(blockquote.innerHTML, "
ab
", "Pressing Backspace key at the end of
should remove the last character in the
"
);
// 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
"
);
is(range.startContainer, blockquote, "range should be collapsed in the
"
);
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
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 ist noch experimentell.