diff --git a/Base/home/anon/www/events.html b/Base/home/anon/www/events.html
new file mode 100644
index 00000000000..42f6ed948bc
--- /dev/null
+++ b/Base/home/anon/www/events.html
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+ Hello there!
+
+
diff --git a/Base/home/anon/www/welcome.html b/Base/home/anon/www/welcome.html
index b76f32aac4a..f611edb9448 100644
--- a/Base/home/anon/www/welcome.html
+++ b/Base/home/anon/www/welcome.html
@@ -17,18 +17,13 @@ h1 {
color: #a00;
}
-
Welcome to the Serenity Browser!
This is a very simple browser built on the LibWeb engine.
Some small test pages:
+ - simple DOM events test
- simple DOM JS test
- alert() test
- small
diff --git a/Libraries/LibWeb/HtmlView.cpp b/Libraries/LibWeb/HtmlView.cpp
index 9b1ca65ee4f..cdb608e66df 100644
--- a/Libraries/LibWeb/HtmlView.cpp
+++ b/Libraries/LibWeb/HtmlView.cpp
@@ -184,6 +184,7 @@ void HtmlView::mousemove_event(GUI::MouseEvent& event)
#endif
is_hovering_link = true;
}
+ const_cast(node)->dispatch_event("mousemove");
}
if (m_in_mouse_selection) {
layout_root()->selection().set_end({ result.layout_node, result.index_in_node });
@@ -234,6 +235,7 @@ void HtmlView::mousedown_event(GUI::MouseEvent& event)
m_in_mouse_selection = true;
}
}
+ const_cast(node)->dispatch_event("mousedown");
}
}
if (hovered_node_changed)