summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2019-05-03 08:24:34 +0100
committerMichael Drake <michael.drake@codethink.co.uk>2019-05-03 08:25:24 +0100
commit35e9b5de6d59436568d9cbb951c98e716716bd7e (patch)
tree87c8902ac329caf788633df4c46f825cfb6b7f96 /test
parent519f0294205389dbf809fd2de206dcf21187bcfc (diff)
downloadnetsurf-35e9b5de6d59436568d9cbb951c98e716716bd7e.tar.gz
netsurf-35e9b5de6d59436568d9cbb951c98e716716bd7e.tar.bz2
Tests: Add simple JS test for dynamic layout.
Diffstat (limited to 'test')
-rw-r--r--test/js/event-onclick-insert.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/js/event-onclick-insert.html b/test/js/event-onclick-insert.html
new file mode 100644
index 000000000..62b9d7ee8
--- /dev/null
+++ b/test/js/event-onclick-insert.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<body>
+
+<button onclick="add_paragraph()">Click me!</button>
+
+<script>
+function add_paragraph() {
+ var paragraph = document.createElement("P");
+ var textnode = document.createTextNode("New paragraph!");
+ paragraph.appendChild(textnode);
+ document.body.appendChild(paragraph);
+}
+</script>
+
+</body>
+</html>
+