diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2021-10-01 19:18:19 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-10-01 20:14:45 +0200 |
commit | f176514db855bcd93637f639e2f6fc745e5542d0 (patch) | |
tree | 17ddc5da4ddf038475ba2474ab6a0b97dc38f7cf /Userland/Libraries/LibWeb | |
parent | 1c4404c46a0a6a57246241dd428c5cefdb51c112 (diff) | |
download | serenity-f176514db855bcd93637f639e2f6fc745e5542d0.zip |
LibWeb: Add the UIEvent::{view, detail} IDL attributes
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; }; |