summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/editing/crashtests/inserttext-with-clearing-subscript.html
blob: 9c27a7ed53876bd6745fb794b8693c4570af2cd9 (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
25
26
27
28
29
30
31
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script>
document.addEventListener("DOMContentLoaded", () => {
  getSelection().collapse(document.querySelector("code[contenteditable]").firstChild, 0);
  window.top.find("A");
  document.querySelector("table").insertRow(1);
  document.querySelector("table").insertRow(1);
  document.execCommand("subscript");
  document.execCommand("foreColor", false, "currentColor");
  document.execCommand("insertHTML", false, document.querySelector("h5").outerHTML);
  document.execCommand("subscript");
  document.execCommand("foreColor", false, "currentColor");
  document.execCommand("insertHTML", false, document.querySelector("h5").outerHTML);
  document.execCommand("insertText", false, "A");
});
</script>
</head>
<body>
<table>
<tr>
<td>
<code contenteditable>
A
<h5>
</h5>
</code>
</body>
</html>