summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/editing/crashtests/inserthtml-to-replace-root-list-element-in-designMode.html
blob: c751a5bebcdf420c0eee239e490a7c6a1875e978 (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
32
33
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script>
document.addEventListener("DOMContentLoaded", () => {
  document.execCommand("selectAll");
  const editingHost = document.querySelector("thead[contenteditable]");
  editingHost.addEventListener("focus", () => {
    editingHost.addEventListener("focusout", () => {
      document.execCommand("italic");
      document.execCommand("insertText", false, "A");
      document.execCommand("insertUnorderedList");
    });
    document.designMode = "on";
    document.execCommand("selectAll");
    document.execCommand("insertHTML", false, "A");
  });
  editingHost.focus();
});
</script>
</head>
<body>
<big>
</big>
<table>
<thead contenteditable>
</thead></table>
<p>
<object></object>
</p>
</body>
</html>