17 document
.getElementById('mydiv').focus();
19 exceptions
+= "Exception: " + e
+ "\n";
24 document
.getElementById('result').focus();
26 exceptions
+= "Exception: " + e
+ "\n";
30 if (pass1
&& pass2
&& pass3
) {
31 result
= "Test Passed.";
33 result
= "Test Failed.";
36 document
.getElementById('result').innerHTML
= result
;
37 document
.getElementById('exc').innerHTML
= exceptions
;
41 <body onload=
"focusIt()">
42 This test will try to call focus() on a contenteditable div, and then a normal div.
43 <br>The window should scroll to reveal the contenteditable div.
44 <div style=
"width:500px;height:800px"></div>
45 <div id=
"mydiv" onfocus=
"pass3 = true;" style=
"border-style:solid" contenteditable
>contentEditable div
</div>
46 <div id=
"result"></div>