diff options
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r-- | Userland/Libraries/LibWeb/UIEvents/UIEvent.h | 8 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/UIEvents/UIEvent.idl | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/UIEvents/UIEvent.h b/Userland/Libraries/LibWeb/UIEvents/UIEvent.h index c0f42ea703..0bf85a1932 100644 --- a/Userland/Libraries/LibWeb/UIEvents/UIEvent.h +++ b/Userland/Libraries/LibWeb/UIEvents/UIEvent.h @@ -6,7 +6,9 @@ #pragma once +#include <AK/RefPtr.h> #include <LibWeb/DOM/Event.h> +#include <LibWeb/DOM/Window.h> namespace Web::UIEvents { @@ -16,11 +18,17 @@ public: virtual ~UIEvent() override { } + DOM::Window const* view() const { return m_window; } + int detail() const { return m_detail; } + protected: explicit UIEvent(const FlyString& event_name) : Event(event_name) { } + + RefPtr<DOM::Window> m_window; + int m_detail { 0 }; }; } diff --git a/Userland/Libraries/LibWeb/UIEvents/UIEvent.idl b/Userland/Libraries/LibWeb/UIEvents/UIEvent.idl index f885f4669a..071dbffde9 100644 --- a/Userland/Libraries/LibWeb/UIEvents/UIEvent.idl +++ b/Userland/Libraries/LibWeb/UIEvents/UIEvent.idl @@ -1,3 +1,4 @@ interface UIEvent : Event { - + readonly attribute Window? view; + readonly attribute long detail; }; |