Backed out changeset b71c8c052463 (bug 1943846) for causing mass failures. CLOSED...
[gecko.git] / editor / libeditor / crashtests / 1533913.html
blob3009bbb6601eba45afa69dce669067ee5c2fd0dd
1 <script>
2 function onLoad() {
3 // For emulating the traditional behavior, collapse Selection to end of the
4 // text node which is the last child of the <dd contenteditable> which is the
5 // last child of the <body>.
6 const dd = document.querySelector("dd[contenteditable]");
7 getSelection().collapse(dd.lastChild, dd.lastChild.length);
8 document.execCommand("justifyFull");
9 document.execCommand("selectAll");
10 window.top.addEventListener("DOMNodeRemoved", () => {
11 document.execCommand("insertHTML", false, undefined)
12 });
13 document.execCommand("heading", false, "H1")
15 </script>
16 <body onload="onLoad()">
17 <dd contenteditable>A
18 <!-- A -->
19 </dd></body>