Interface AddEventListenerOptions

interface AddEventListenerOptions {
    capture?: boolean;
    once?: boolean;
    passive?: boolean;
    signal?: AbortSignal;
}

Hierarchy (view full)

Properties

capture?: boolean

Not directly used by Node.js. Added for API completeness. Default: false.

once?: boolean

When true, the listener is automatically removed when it is first invoked. Default: false.

passive?: boolean

When true, serves as a hint that the listener will not call the Event object's preventDefault() method. Default: false.

signal?: AbortSignal

The listener will be removed when the given AbortSignal object's abort() method is called.