1
Fork 0
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:
Idan Horowitz 2021-10-01 19:18:19 +03:00 committed by Andreas Kling
parent 1c4404c46a
commit f176514db8
2 changed files with 10 additions and 1 deletions

View file

@ -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 };
};
}

View file

@ -1,3 +1,4 @@
interface UIEvent : Event {
readonly attribute Window? view;
readonly attribute long detail;
};