3 <title>dynamically inserted control with
"autofocus" set
</title>
5 input { background:red }
6 input:focus { background:lime }
8 <script src=
"resources/common.js"></script>
9 <script language=
"JavaScript" type=
"text/javascript">
10 function log(message
) {
11 document
.getElementById("console").innerHTML
+= "<li>"+message
+"</li>";
15 if (window
.testRunner
)
16 testRunner
.dumpAsText();
18 if (document
.activeElement
== document
.getElementsByTagName("input")[0])
22 if (window
.testRunner
)
23 testRunner
.notifyDone();
26 waitUntilLoadedAndAutofocused(test
);
30 <p>FAIL (The script did not run.)
</p>
32 document
.getElementsByTagName('p')[0].innerHTML
= "This form control should have a green background: <input autofocus>";
35 <ol id=
"console"></ol>