diff options
author | Vincent Sanders <vince@kyllikki.org> | 2012-11-18 21:49:25 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2012-11-18 21:49:25 +0000 |
commit | 4769698d13ca82c535896d7b168ee956709b12a8 (patch) | |
tree | 3b1308af709b4a13785912399d8c14516bf98001 /test/js/dom-document-enumerate.html | |
parent | 8810bc01635996fc6afa33a84ffb004aca6095e3 (diff) | |
download | netsurf-4769698d13ca82c535896d7b168ee956709b12a8.tar.gz netsurf-4769698d13ca82c535896d7b168ee956709b12a8.tar.bz2 |
add enumeration test on the document node
Diffstat (limited to 'test/js/dom-document-enumerate.html')
-rw-r--r-- | test/js/dom-document-enumerate.html | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/js/dom-document-enumerate.html b/test/js/dom-document-enumerate.html new file mode 100644 index 000000000..18146ab8a --- /dev/null +++ b/test/js/dom-document-enumerate.html @@ -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> |