summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/Bindings/WindowObject.h
diff options
context:
space:
mode:
authorLuke <luke.wilde@live.co.uk>2020-11-21 18:32:39 +0000
committerAndreas Kling <kling@serenityos.org>2020-11-22 18:20:56 +0100
commite8b3a6558191e97ffab28943865a9459f013969e (patch)
treed332303702f9ab31773668fac51b6b4a03dd4b47 /Libraries/LibWeb/Bindings/WindowObject.h
parent819f099a8eb595689bc37933c10d2a4fdb7737b1 (diff)
downloadserenity-e8b3a6558191e97ffab28943865a9459f013969e.zip
LibWeb: Make event dispatching spec-compliant
Specification: https://dom.spec.whatwg.org/#concept-event-dispatch This also introduces shadow roots due to it being a requirement of the event dispatcher. However, it does not introduce the full shadow DOM, that can be left for future work. This changes some event dispatches which require certain attributes to be initialised to a value.
Diffstat (limited to 'Libraries/LibWeb/Bindings/WindowObject.h')
-rw-r--r--Libraries/LibWeb/Bindings/WindowObject.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/Libraries/LibWeb/Bindings/WindowObject.h b/Libraries/LibWeb/Bindings/WindowObject.h
index bddabf3334..a1a9a27c9d 100644
--- a/Libraries/LibWeb/Bindings/WindowObject.h
+++ b/Libraries/LibWeb/Bindings/WindowObject.h
@@ -26,6 +26,7 @@
#pragma once
+#include <AK/TypeCasts.h>
#include <AK/Weakable.h>
#include <LibJS/Runtime/GlobalObject.h>
#include <LibWeb/Forward.h>
@@ -58,6 +59,8 @@ private:
JS_DECLARE_NATIVE_GETTER(performance_getter);
+ JS_DECLARE_NATIVE_GETTER(event_getter);
+
JS_DECLARE_NATIVE_FUNCTION(alert);
JS_DECLARE_NATIVE_FUNCTION(confirm);
JS_DECLARE_NATIVE_FUNCTION(set_interval);
@@ -77,3 +80,7 @@ private:
}
}
+
+AK_BEGIN_TYPE_TRAITS(Web::Bindings::WindowObject)
+static bool is_type(const JS::GlobalObject& global) { return String(global.class_name()) == "WindowObject"; }
+AK_END_TYPE_TRAITS()