selectInNode(input);
ok(document.execCommand("inserthtml", false, ""), "execCommand should return true");
is(input.textContent, "", "empty inserthtml with empty selection shouldn't change contents");
selectInNode(input);
ok(document.execCommand("inserthtml", false, "foo"), "execCommand should return true");
is(input.textContent, "foo", "'foo'inserthtml with empty selection should add foo to contents");
selectNode(input);
ok(document.execCommand("inserthtml", false, "bar"), "execCommand should return true");
is(input.textContent, "bar", "'bar' inserthtml with complete selection should replace contents with bar");
selectNode(input);
ok(document.execCommand("inserthtml", false, ""), "execCommand should return true");
is(input.textContent, "", "empty inserthtml with complete selection should delete everything");
}
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.