summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2016-02-01 15:36:12 +0000
committerMichael Drake <michael.drake@codethink.co.uk>2016-02-01 15:36:12 +0000
commitb1dbc046f1b5e511351285796953f2a49c003b24 (patch)
tree33f80f1ff46d0c324d262ee2347688d07d6d4f34 /test
parent2443cc432db11780d432b06dca05921cd51186e0 (diff)
downloadnetsurf-b1dbc046f1b5e511351285796953f2a49c003b24.tar.gz
netsurf-b1dbc046f1b5e511351285796953f2a49c003b24.tar.bz2
Add paragraph proto test.
Diffstat (limited to 'test')
-rw-r--r--test/js/dom-element-create.html23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/js/dom-element-create.html b/test/js/dom-element-create.html
new file mode 100644
index 000000000..05552c908
--- /dev/null
+++ b/test/js/dom-element-create.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Create paragraph and inspect its proto</title>
+<link rel="stylesheet" type="text/css" href="tst.css">
+</head>
+<body>
+<h1>HTMLElement test of attribute set/remove</h1>
+
+<script>
+ var e = document.createElement("p");
+ var t = document.createTextNode("Some text in a paragraph.");
+ e.appendChild(t);
+ e.setAttribute("id", "test");
+ document.body.appendChild(e);
+</script>
+<script>
+ var test = document.getElementById("test");
+ document.write("<p>Paragraph element proto: ", test, ".</p>");
+</script>
+
+</body>
+</html>