interface
__internal.BunEventTarget
interface BunEventTarget
The Node.js-flavored members of the global EventTarget, used only when lib.dom.d.ts is not loaded, same as BunEvent.
- type: string,): void;
Adds a new handler for the
typeevent. Any givenlisteneris added only once pertypeand percaptureoption value.If the
onceoption is true, thelisteneris removed after the next time atypeevent is dispatched.The
captureoption is not used by Node.js in any functional way other than tracking registered event listeners per theEventTargetspecification. Specifically, thecaptureoption is used as part of the key when registering alistener. Any individuallistenermay be added once withcapture = false, and once withcapture = true. - ): boolean;
Dispatches a synthetic event
eventto target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. - type: string,): void;
Removes the event listener in target's event listener list with the same type, callback, and options.