Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/forms/the-textarea-element/textarea-splittext-with-range-crash.html - WPT Dashboard Interop Dashboard
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script>
addEventListener("load", () => {
const textarea = document.querySelector("textarea");
const ul = document.createElement('ul');
const textNodeInTextarea = document.createTextNode("");
textarea.appendChild(textNodeInTextarea);
document.documentElement.getBoundingClientRect();
textarea.appendChild(ul);
const range = document.createRange();
range.selectNode(ul);
textNodeInTextarea.data = "ab";
textNodeInTextarea.splitText(1);
});
</script>
</head>
<body><textarea></textarea></body>
</html>