5 li
= document
.createElement('li');
6 li
.appendChild(document
.createTextNode(str
));
7 document
.getElementById('console').appendChild(li
);
9 function printNumChildren(id
)
11 t
= document
.getElementById(id
);
13 print("Can't find " + id
+ ".");
15 print(id
+ " has " + t
.childNodes
.length
+ " children.");
19 if (window
.testRunner
)
20 testRunner
.dumpAsText();
21 printNumChildren('noframes');
22 printNumChildren('noscript');
23 printNumChildren('noembed');
24 printNumChildren('nolayer');
28 <body onload=
"runTests()">
29 <p>This tests that the elements noframes, nolayer, noscript and noembed are created as elements and put in the DOM tree.
30 The elements other than
<nolayer
> should not contain any children.
31 If the test is successful, the four messages below will list
0,
0,
0, and
1 child.
</p>
32 <noframes id=
"noframes">This is noframes.
</noframes>
33 <noscript id=
"noscript">This is noscript.
</noscript>
34 <noembed id=
"noembed">This is noembed.
</noembed>
35 <nolayer id=
"nolayer">This is nolayer.
</nolayer>