summaryrefslogtreecommitdiffstats
path: root/editor/libeditor/crashtests/1425091.html
blob: be8f0519316e477ecbb4ea01cf8211ba2caf0a6b (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
<script>
function onLoad() {
  // For emulating the traditional behavior, collapse Selection to end of the
  // text node at end of the <body>, i.e., end of the text node after the
  // <meter>.
  getSelection().collapse(
    document.body.lastChild,
    document.body.lastChild.length
  );
  document.scrollingElement.addEventListener("DOMNodeInserted", () => {
    document.execCommand("selectAll");
    document.execCommand("insertOrderedList");
  });
  document.querySelector("style").appendChild(
    document.createElement("e")
  );
}
</script>
<body onload="onLoad()">
<meter contenteditable>
<dialog>
<style></style>
</dialog>
</meter>
</body>