2 <html class=
"reftest-wait">
4 <iframe srcdoc=
"<body><div></div></body>"></iframe>
5 <script type=
"text/javascript">
7 var i
= document
.querySelector("iframe");
8 var win
= i
.contentWindow
;
9 var doc
= win
.document
;
10 var div
= doc
.querySelector("div");
11 win
.getSelection().collapse(div
, 0);
13 div
.contentEditable
= true;
15 setTimeout(function() {
16 var span
= doc
.createElement("span");
17 span
.appendChild(doc
.createTextNode("foo"));
18 div
.appendChild(span
);
19 div
.style
.outline
= "none"; // remove the focus outline
20 i
.style
.position
= "absolute";
21 document
.body
.clientWidth
;
22 document
.documentElement
.removeAttribute("class");