mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
3479f1c4e8
This also adds a variant of {add,remove}_event_listener called {add,remove}_event_listener_with_options. This is used internally to perform {add,remove}_event_listener with a default constructed options struct. It was done like this because default constructing the Variant with the options struct requires the struct defintions to be present, which requires us to include AbortSignal.h, which would cause a circular include as AbortSignal.h includes EventTarget.h.
21 lines
616 B
Plaintext
21 lines
616 B
Plaintext
#import <DOM/AbortSignal.idl>
|
|
|
|
interface EventTarget {
|
|
|
|
undefined addEventListener(DOMString type, EventListener? callback, optional (AddEventListenerOptions or boolean) options = {});
|
|
undefined removeEventListener(DOMString type, EventListener? callback, optional (EventListenerOptions or boolean) options = {});
|
|
|
|
[ImplementedAs=dispatch_event_binding] boolean dispatchEvent(Event event);
|
|
|
|
};
|
|
|
|
dictionary EventListenerOptions {
|
|
boolean capture = false;
|
|
};
|
|
|
|
dictionary AddEventListenerOptions : EventListenerOptions {
|
|
boolean passive = false;
|
|
boolean once = false;
|
|
AbortSignal signal;
|
|
};
|