1 <html xmlns=
"http://www.w3.org/1999/xhtml" class=
"reftest-wait">
3 <body><div contenteditable=
"true"></div><div><input><div></div></input></div></body>
8 // For emulating the traditional behavior, collapse Selection to end of the
9 // parent <div> of the <input>. In XHTML document, the <input> may have the
10 // <div> child. Therefore, the deepest last child container element of the
11 // <body> is the parent of the <input>.
12 getSelection().collapse(
13 document
.querySelector("input").parentElement
,
14 document
.querySelector("input").parentElement
.childNodes
.length
16 document
.querySelector("input").focus();
19 document
.execCommand("stylewithcss", false, "true");
22 document
.execCommand("inserthtml", false, "<x>X</x>");
25 document
.execCommand("underline");
28 document
.execCommand("justifyfull");
31 document
.execCommand("underline");
34 document
.execCommand("insertParagraph");
37 document
.execCommand("delete");
41 document
.execCommand("stylewithcss", false, "false");
44 document
.execCommand("inserthtml", false, "<x>X</x>");
47 document
.execCommand("underline");
50 document
.execCommand("justifyfull");
53 document
.execCommand("underline");
56 document
.execCommand("insertParagraph");
59 document
.execCommand("delete");
62 document
.documentElement
.removeAttribute("class");
64 addEventListener("load", onLoad
);