ladybird/Libraries/LibWeb/DOM/EventTarget.idl
Shannon Booth e555edd770 LibWeb/Bindings: Implement callback interface object bindings
Generate correct bindings for callback interfaces: only create an
interface object when the interface declares constants, and set up
the prototype correctly.

This also lets us tidy up some IDL for these callback interfaces.
2026-03-11 21:16:44 +01:00

22 lines
713 B
Text

#import <DOM/AbortSignal.idl>
#import <DOM/EventListener.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);
};
dictionary EventListenerOptions {
boolean capture = false;
};
dictionary AddEventListenerOptions : EventListenerOptions {
boolean passive;
boolean once = false;
AbortSignal signal;
};