execCommand-at-load-with-changing-editing-host.html (581B)
1 <!DOCTYPE html> 2 <html contenteditable="true"> 3 <head> 4 <meta charset="utf-8"> 5 <title>Test for bug 615450 of Mozilla</title> 6 <script> 7 function boom() 8 { 9 document.documentElement.appendChild(document.body); 10 document.documentElement.contentEditable = "false"; 11 try { document.execCommand("outdent", false, null); } catch(e) { } 12 document.body.contentEditable = "true"; 13 try { document.execCommand("inserthtml", false, "x"); } catch(e) { } 14 } 15 </script> 16 </head> 17 <body onload="boom();"><div style="margin-left: 40px;"><span contenteditable="true">p q r s</span> T</div></body></html>