Backed out 2 changesets (bug 1943998) for causing wd failures @ phases.py CLOSED...
[gecko.git] / editor / libeditor / crashtests / 1405897.html
blob60118628b55f29f413737d643f3a441081e67b04
1 <style>
2 * { position: absolute; }
3 </style>
4 <script>
5 function onLoad() {
6 // For emulating the traditional behavior, collapse Selection to end of the
7 // text node in the <iframe> which is the last child of the <body>. Note that
8 // <iframe> is treated as a container in HTMLEditor.
9 const iframe = document.querySelector("iframe");
10 getSelection().collapse(iframe.firstChild, iframe.firstChild.length);
11 document.querySelector("del").addEventListener("DOMSubtreeModified", () => {
12 document.execCommand("italic");
13 document.execCommand("selectAll");
14 });
15 const anchor = document.querySelector("a[contenteditable]");
16 anchor.replaceChild(iframe, anchor.childNodes[0]);
18 </script>
19 <body onload="onLoad()">
20 <a contenteditable>
21 <del>
22 <iframe>
23 </body>