mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:18:14 +00:00
LibWeb: Add the UIEvent::{view, detail} IDL attributes
This commit is contained in:
parent
1c4404c46a
commit
f176514db8
2 changed files with 10 additions and 1 deletions
|
@ -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 };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
interface UIEvent : Event {
|
||||
|
||||
readonly attribute Window? view;
|
||||
readonly attribute long detail;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue