<!DOCTYPEhtml>
<html>
<head>
<script>
document.addEventListener('DOMContentLoaded', () => {
const table = document.querySelector("table");
// For emulating traditional behavior, collapse Selection to end of the
// text node after the <p> (<table> does not close the <p>).
getSelection().collapse(
document.body.lastChild,
document.body.lastChild.length
);
const paragraph = document.querySelector("p");
document.documentElement.contentEditable = true;
getSelection().setBaseAndExtent(document, 0, document.documentElement, 1);
paragraph.contentEditable = false; table.insertRow(0);
document.execCommand("forwardDelete");
});
<script
<> does not close the p).
<p>
<del>
getSelection(.ollapse(
dbody.astChild table>
/table>
/del>
</getSelection).etBaseAndExtentdocument, 0, document.documentElement, 1);
</body>
</html>
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.