mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:47:45 +00:00
LibWeb: Add constructor to Event IDL interface
This commit is contained in:
parent
0f1da7d40c
commit
0ac07c7351
2 changed files with 8 additions and 0 deletions
|
@ -27,6 +27,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <AK/FlyString.h>
|
#include <AK/FlyString.h>
|
||||||
|
#include <LibWeb/Bindings/WindowObject.h>
|
||||||
#include <LibWeb/Bindings/Wrappable.h>
|
#include <LibWeb/Bindings/Wrappable.h>
|
||||||
#include <LibWeb/DOM/EventTarget.h>
|
#include <LibWeb/DOM/EventTarget.h>
|
||||||
|
|
||||||
|
@ -64,6 +65,10 @@ public:
|
||||||
{
|
{
|
||||||
return adopt(*new Event(event_name));
|
return adopt(*new Event(event_name));
|
||||||
}
|
}
|
||||||
|
static NonnullRefPtr<Event> create_with_global_object(Bindings::WindowObject&, const FlyString& event_name)
|
||||||
|
{
|
||||||
|
return Event::create(event_name);
|
||||||
|
}
|
||||||
|
|
||||||
virtual ~Event() { }
|
virtual ~Event() { }
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
interface Event {
|
interface Event {
|
||||||
|
|
||||||
|
// FIXME: second parameter: 'optional EventInit eventInitDict = {}'
|
||||||
|
constructor(DOMString type);
|
||||||
|
|
||||||
readonly attribute DOMString type;
|
readonly attribute DOMString type;
|
||||||
readonly attribute EventTarget? target;
|
readonly attribute EventTarget? target;
|
||||||
readonly attribute EventTarget? srcTarget;
|
readonly attribute EventTarget? srcTarget;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue