From f39e5352f05c86dfd499b18952692d0f97c36aac Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 18 Mar 2020 15:22:31 +0100 Subject: LibWeb: Start working on DOM event support This patch adds the EventTarget class and makes Node inherit from it. You can register event listeners on an EventTarget, and when you call dispatch_event() on it, the event listeners will get invoked. An event listener is basically a wrapper around a JS::Function*. This is pretty far from how DOM events should eventually work, but it's a place to start and we'll build more on top of this. :^) --- Libraries/LibWeb/Bindings/DocumentWrapper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Libraries/LibWeb/Bindings/DocumentWrapper.h') diff --git a/Libraries/LibWeb/Bindings/DocumentWrapper.h b/Libraries/LibWeb/Bindings/DocumentWrapper.h index 677e980455..dcf8e48348 100644 --- a/Libraries/LibWeb/Bindings/DocumentWrapper.h +++ b/Libraries/LibWeb/Bindings/DocumentWrapper.h @@ -40,7 +40,7 @@ public: const Document& node() const; private: - virtual const char* class_name() const override { return "Document"; } + virtual const char* class_name() const override { return "DocumentWrapper"; } }; } -- cgit v1.2.3