Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /editing/crashtests/insertText-at-end-of-text-in-body.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script>
addEventListener("load", event => {
document.body.focus();
const text = document.createTextNode("x".repeat(15));
document.body.appendChild(text);
getSelection().collapse(text, text.length);
document.execCommand("insertText", false, "a");
});
</script>
</head>
<body contenteditable></body>
</html>