ladybird/Userland/Libraries/LibWeb/DOM/EventTarget.idl
Jelle Raaijmakers d5fd29adb7 LibWeb: Update DOM IDL specs
I noticed some of these were running behind the upstream spec.
2024-10-14 11:57:58 -04:00

26 lines
811 B
Text

#import <DOM/AbortSignal.idl>
// https://dom.spec.whatwg.org/#eventtarget
[Exposed=*]
interface EventTarget {
constructor();
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);
};
// FIXME: support callback interface
//callback interface EventListener {
// undefined handleEvent(Event event);
//};
dictionary EventListenerOptions {
boolean capture = false;
};
dictionary AddEventListenerOptions : EventListenerOptions {
boolean passive = false;
boolean once = false;
AbortSignal signal;
};