Backed out 2 changesets (bug 1943998) for causing wd failures @ phases.py CLOSED...
[gecko.git] / editor / libeditor / crashtests / 1605741.html
blob7868adcf967c4983d6371318a27b6d01bf009830
1 <script>
2 addEventListener("load", () => {
3 const editingHost = document.querySelector("div[contenteditable]");
4 // For emulating the traditional behavior, collapse Selection to end of the
5 // text node in the <div contenteditable> which is the last child of the
6 // <body>.
7 getSelection().collapse(editingHost.lastChild, editingHost.lastChild.length);
8 editingHost.addEventListener("DOMNodeRemoved", () => {
9 getSelection().collapse(null);
10 });
11 document.execCommand("delete");
12 });
13 </script>
14 <div contenteditable>x</link></body>