Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script>
"use strict";
addEventListener("DOMContentLoaded", () => {
const h1 = document.querySelector("h1");
h1.insertAdjacentElement("afterEnd", document.querySelector("th"));
getSelection().collapse(document.querySelector("area"), 0);
document.execCommand("selectAll");
document.execCommand("insertText", false, "foo");
}, {once: true});
</script>
</head>
<body>
<ul contenteditable="plaintext-only">
<li>
<canvas>
<table>
<th>a</th>
</table>
</canvas>
<h1></h1>
<dialog>
<area></area>
</dialog>
</li>
</ul>
</body>
</html>