netsurf/test/js/dom-node-enumerate.html

26 lines
665 B
HTML
Raw Normal View History

2012-11-14 03:21:16 +04:00
<html>
<head>
<title>Node interface enumeration</title>
<link rel="stylesheet" type="text/css" href="tst.css">
</head>
<body>
<h1>Node 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(") = "));
2012-11-14 03:21:16 +04:00
document.body.appendChild(document.createTextNode(y));
document.body.appendChild(document.createElement('br'));
}
for(var key in Node){
output(key, Node[key]);
}
</script>
</body>
</html>