summaryrefslogtreecommitdiff
path: root/Base/home/anon/www
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-03-18 15:28:22 +0100
committerAndreas Kling <kling@serenityos.org>2020-03-18 17:13:22 +0100
commite2650587689f9db5f5c9c7d078b7a1a520d988ac (patch)
treeba1330acfa6ac504d7baba6c987abdf023a4c675 /Base/home/anon/www
parentf39e5352f05c86dfd499b18952692d0f97c36aac (diff)
downloadserenity-e2650587689f9db5f5c9c7d078b7a1a520d988ac.zip
LibWeb: Fire "mousedown" and "mousemove" events in the DOM :^)
Diffstat (limited to 'Base/home/anon/www')
-rw-r--r--Base/home/anon/www/events.html25
-rw-r--r--Base/home/anon/www/welcome.html7
2 files changed, 26 insertions, 6 deletions
diff --git a/Base/home/anon/www/events.html b/Base/home/anon/www/events.html
new file mode 100644
index 0000000000..42f6ed948b
--- /dev/null
+++ b/Base/home/anon/www/events.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script>
+ function foo() {
+ alert("It loaded!");
+ }
+ document.addEventListener("DOMContentLoaded", foo);
+
+ function on_mousedown() {
+ alert("Mouse down!");
+ }
+
+ function on_mousemove() {
+ alert("Mouse move!");
+ }
+
+ document.getElementById("my_div").addEventListener("mousedown", on_mousedown);
+ document.getElementById("my_div").addEventListener("mousemove", on_mousemove);
+ </script>
+ </head>
+ <body>
+ <div id="my_div">Hello there!</div>
+ </body>
+</html>
diff --git a/Base/home/anon/www/welcome.html b/Base/home/anon/www/welcome.html
index b76f32aac4..f611edb944 100644
--- a/Base/home/anon/www/welcome.html
+++ b/Base/home/anon/www/welcome.html
@@ -17,18 +17,13 @@ h1 {
color: #a00;
}
</style>
- <script>
- function foo() {
- alert("It loaded!");
- }
- document.addEventListener("DOMContentLoaded", foo);
- </script>
</head>
<body link="#44f" vlink="#c4c" background="90s-bg.png">
<h1>Welcome to the Serenity Browser!</h1>
<p>This is a very simple browser built on the LibWeb engine.</p>
<p>Some small test pages:</p>
<ul>
+ <li><a href="events.html">simple DOM events test</a></li>
<li><a href="dom.html">simple DOM JS test</a></li>
<li><a href="alert.html">alert() test</a></li>
<li><a href="small.html">small</a></li>