summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/forms/the-textarea-element/textarea-splittext-with-range-crash.html
blob: 9d66a4ae05cccd10bdd851205f6312f3cedd28dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!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>