summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/editing/crashtests/remove-parent-element-during-inserthtml.html
blob: 3a0cf1c9578d9c5d8b2b8e4216f97567ed25be76 (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>
document.addEventListener("DOMContentLoaded", () => {
  document.onselectionchange = () => {
    document.execCommand("insertHTML", false, "a")
    document.designMode = "on"
  };
  window.find("a");
  document.querySelector("dl[contenteditable] > dd").addEventListener("DOMNodeRemoved", () => {
    document.querySelector("dl[contenteditable]").remove();
  });
});
</script>
</head>
<body>
<dl contenteditable>
<dd></dd>
a
</dl>
</body>
</html>