mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-26 14:07:05 +03:00
add enumeration test on the document node
This commit is contained in:
parent
8810bc0163
commit
4769698d13
26
test/js/dom-document-enumerate.html
Normal file
26
test/js/dom-document-enumerate.html
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>document interface enumeration</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="tst.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Document interface enumeration</h1>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function output(x,y) {
|
||||||
|
document.body.appendChild(document.createTextNode(x));
|
||||||
|
document.body.appendChild(document.createTextNode("("));
|
||||||
|
if (y != undefined) {
|
||||||
|
document.body.appendChild(document.createTextNode(y.length));
|
||||||
|
}
|
||||||
|
document.body.appendChild(document.createTextNode(") = "));
|
||||||
|
document.body.appendChild(document.createTextNode(y));
|
||||||
|
document.body.appendChild(document.createElement('br'));
|
||||||
|
}
|
||||||
|
|
||||||
|
for(var key in document) {
|
||||||
|
output(key, document[key]);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -36,6 +36,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li><a href="dom-node-enumerate.html">Node element interface</a></li>
|
<li><a href="dom-node-enumerate.html">Node element interface</a></li>
|
||||||
<li><a href="dom-body-enumerate.html">Body element interface</a></li>
|
<li><a href="dom-body-enumerate.html">Body element interface</a></li>
|
||||||
|
<li><a href="dom-document-enumerate.html">Document interface</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3>Document element specific</h3>
|
<h3>Document element specific</h3>
|
||||||
<ul>
|
<ul>
|
||||||
|
Loading…
Reference in New Issue
Block a user