summaryrefslogtreecommitdiffstats
path: root/editor/libeditor/crashtests/1402196.html
blob: 8e0a7be0fefb396c5ef0ed55d7f8a5f6142a4bbe (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
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<script>
function onLoad() {
  // For emulating the traditional behavior, collapse Selection to end of the
  // <p> which is the deepest last child of the <body> (<spacer> can contain
  // <p>).
  getSelection().collapse(
    document.querySelector("p"),
    document.querySelector("p").childNodes.length
  );
  document.querySelector("spacer").addEventListener("DOMNodeInserted", () => {
    document.querySelector("style").appendChild(
      document.querySelector("table")
    );
    document.documentElement.classList.remove("reftest-wait");
  });
  document.execCommand("insertOrderedList");
}
</script>
</head>
<body onload="onLoad()">
<table></table>
<style></style>
<spacer contenteditable>
<p></p>
</body>
</html>