summaryrefslogtreecommitdiff
path: root/test/js/document-url.html
diff options
context:
space:
mode:
authorOle Loots <ole@monochrom.net>2012-12-18 01:28:22 +0100
committerOle Loots <ole@monochrom.net>2012-12-18 01:28:22 +0100
commit3019368c93600a335445c09178c9554074c7f656 (patch)
tree872c3bcbba0b74584cda24bee36ffe784806108f /test/js/document-url.html
parentc6a5109a95c1206ccf63d99316fa12b8c43bb7cf (diff)
parent0d803b6c0d252c3a1a9fa07e37d9a0b08ce567b8 (diff)
downloadnetsurf-3019368c93600a335445c09178c9554074c7f656.tar.gz
netsurf-3019368c93600a335445c09178c9554074c7f656.tar.bz2
Merge branch 'master' into mono/removing-windom-dependency
Diffstat (limited to 'test/js/document-url.html')
-rw-r--r--test/js/document-url.html31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/js/document-url.html b/test/js/document-url.html
new file mode 100644
index 000000000..2299b5775
--- /dev/null
+++ b/test/js/document-url.html
@@ -0,0 +1,31 @@
+<html>
+<head>
+<title>document location and URL interface</title>
+<link rel="stylesheet" type="text/css" href="tst.css">
+</head>
+<body>
+<h1>document location and URL interface</h1>
+
+<h2>Document location enumeration</h2>
+<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.location) {
+ output(key, document.location[key]);
+}
+</script>
+<h2>Document URL</h2>
+<script>output("document.URL", document.URL);</script>
+<h2>DocumentURI</h2>
+<script>output("document.documentURI", document.documentURI);</script>
+</body>
+</html>