summaryrefslogtreecommitdiff
path: root/test/js
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2015-11-22 16:53:22 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2015-11-22 16:53:22 +0000
commit4137739b8ae3829d679b59a0894d1189a4e776d4 (patch)
tree470da94f491ac21b5c30b1954e6aceb37423f61e /test/js
parentc92726d3aa05e7fd3ffb00a2b115c61e42c6270d (diff)
downloadnetsurf-4137739b8ae3829d679b59a0894d1189a4e776d4.tar.gz
netsurf-4137739b8ae3829d679b59a0894d1189a4e776d4.tar.bz2
Tests for body onload behaviour
Diffstat (limited to 'test/js')
-rw-r--r--test/js/event-onloadfrombody.html10
-rw-r--r--test/js/event-onloadfrombody2.html13
-rw-r--r--test/js/index.html1
3 files changed, 24 insertions, 0 deletions
diff --git a/test/js/event-onloadfrombody.html b/test/js/event-onloadfrombody.html
new file mode 100644
index 000000000..be491e6dd
--- /dev/null
+++ b/test/js/event-onloadfrombody.html
@@ -0,0 +1,10 @@
+<html>
+<head>
+<title>alert based onload (from body) example</title>
+
+</head>
+
+<body onload="alert('Running onload')">
+<h1>Just look at the log</h1>
+</body>
+</html>
diff --git a/test/js/event-onloadfrombody2.html b/test/js/event-onloadfrombody2.html
new file mode 100644
index 000000000..542e5ec23
--- /dev/null
+++ b/test/js/event-onloadfrombody2.html
@@ -0,0 +1,13 @@
+<html>
+<head>
+<title>alert based onload (from body IDL attribute) example</title>
+
+</head>
+
+<body>
+ <h1>Just look at the log</h1>
+ <script type="text/javascript">
+ document.body.onload = function() { alert("onload event from IDL attribute"); };
+ </script>
+</body>
+</html>
diff --git a/test/js/index.html b/test/js/index.html
index a1bc4c4de..f5420ed3c 100644
--- a/test/js/index.html
+++ b/test/js/index.html
@@ -80,6 +80,7 @@
<h2>Dom events</h2>
<ul>
<li><a href="event-onload.html">window.onload</a></li>
+<li><a href="event-onloadfrombody.html">body.onload</a></li>
<li><a href="event-onclick.html">button.onclick</a></li>
</ul>