mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:47:45 +00:00
LibWeb: Implement UIEvent.initUIEvent()
1% progression on ACID3. :^)
This commit is contained in:
parent
093e66afc0
commit
d0ab546d7a
2 changed files with 11 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
* Copyright (c) 2020-2022, Andreas Kling <kling@serenityos.org>
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -36,6 +36,13 @@ public:
|
||||||
DOM::Window const* view() const { return m_view; }
|
DOM::Window const* view() const { return m_view; }
|
||||||
int detail() const { return m_detail; }
|
int detail() const { return m_detail; }
|
||||||
|
|
||||||
|
void init_ui_event(String const& type, bool bubbles, bool cancelable, DOM::Window* view, int detail)
|
||||||
|
{
|
||||||
|
init_event(type, bubbles, cancelable);
|
||||||
|
m_view = view;
|
||||||
|
m_detail = detail;
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit UIEvent(FlyString const& event_name)
|
explicit UIEvent(FlyString const& event_name)
|
||||||
: Event(event_name)
|
: Event(event_name)
|
||||||
|
|
|
@ -4,6 +4,9 @@ interface UIEvent : Event {
|
||||||
constructor(DOMString type, optional UIEventInit eventInitDict = {});
|
constructor(DOMString type, optional UIEventInit eventInitDict = {});
|
||||||
readonly attribute Window? view;
|
readonly attribute Window? view;
|
||||||
readonly attribute long detail;
|
readonly attribute long detail;
|
||||||
|
|
||||||
|
// NOTE: This is "deprecated, but supported for backwards-compatibility with widely-deployed implementations."
|
||||||
|
[ImplementedAs=init_ui_event] undefined initUIEvent(DOMString typeArg, optional boolean bubblesArg = false, optional boolean cancelableArg = false, optional Window? viewArg = null, optional long detailArg = 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
dictionary UIEventInit : EventInit {
|
dictionary UIEventInit : EventInit {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue