Bug 1883912: Enable Intl.ListFormat test for "unit" style. r=spidermonkey-reviewers...
[gecko.git] / editor / libeditor / crashtests / 1581246.html
blobe9c472c7d95303bb04682f326d837b3148e04762
1 <script>
2 function onLoad() {
3 // For emulating the traditional behavior, collapse Selection to end of the
4 // text node in the <textarea> which is the last child of the <body>.
5 // However, it may be omitted by the parser. Therefore, this test tries to
6 // check the text node, but if it does not exist, uses the <textarea>.
7 const textarea = document.querySelector("textarea");
8 const textareaOrTextNode = textarea.lastChild ? textarea.lastChild : textarea;
9 getSelection().collapse(textareaOrTextNode, textareaOrTextNode.length);
10 document.querySelector("script").appendChild(
11 document.querySelector("li[contenteditable=false]")
13 document.execCommand("indent");
14 document.execCommand("delete");
16 </script>
17 <body onload="onLoad()">
18 <ul contenteditable>
19 <li contenteditable="false">
20 <textarea autofocus>
21 </textarea>></li></ul></body>