5 text
= document
.createTextNode(str
);
6 debugDiv
= document
.getElementById('debugDiv');
7 div
= document
.createElement('div');
9 debugDiv
.appendChild(div
);
13 if (window
.testRunner
) {
14 testRunner
.dumpAsText();
16 var div
= document
.getElementById("foo");
17 for (var i
= 0; i
< 5; ++i
) {
18 var span
= document
.createElement("span");
19 span
.appendChild(document
.createTextNode(i
));
20 span
.setAttribute("id", "bar");
21 div
.insertBefore(span
, div
.firstChild
);
24 if (document
.getElementById("bar").innerHTML
== 4)
31 <body onload=
"runTest()">
32 This tests that getElementById returns the first element in document order when there are multiple ids. Bug
12988.
33 <div style=
"display:none" id=
"foo">text
</div>