interface

__internal.BunEvent

interface BunEvent

The Node.js-flavored members of the global Event. The global interface picks them up only when lib.dom.d.ts is not loaded: lib.dom declares composedPath(): EventTarget[], which is incompatible with the tuple type below, so when lib.dom is loaded its declarations win.

  • readonly bubbles: boolean

    This is not used in Node.js and is provided purely for completeness.

  • readonly cancelable: boolean

    True if the event was created with the cancelable option

  • cancelBubble: boolean

    Alias for event.stopPropagation(). This is not used in Node.js and is provided purely for completeness.

  • readonly composed: boolean

    This is not used in Node.js and is provided purely for completeness.

  • readonly currentTarget: null | EventTarget

    Alias for event.target.

  • readonly defaultPrevented: boolean

    true if cancelable is true and event.preventDefault() has been called.

  • readonly eventPhase: number

    This is not used in Node.js and is provided purely for completeness.

  • readonly isTrusted: boolean

    The AbortSignal "abort" event is emitted with isTrusted set to true. The value is false in all other cases.

  • returnValue: boolean

    This is not used in Node.js and is provided purely for completeness.

  • readonly srcElement: null | EventTarget

    Alias for event.target.

  • readonly target: null | EventTarget

    The EventTarget dispatching the event

  • readonly timeStamp: number

    The millisecond timestamp when the Event object was created.

  • readonly type: string

    The type of event, for example "click", "hashchange", or "submit".

  • Returns an array containing the current EventTarget as the only entry or empty if the event is not being dispatched. This is not used in Node.js and is provided purely for completeness.

  • Sets the defaultPrevented property to true if cancelable is true.

  • Stops the invocation of event listeners after the current one completes.

  • This is not used in Node.js and is provided purely for completeness.