Skip to main content

Class: EventTarget

Hierarchy#

Constructors#

constructor#

new EventTarget(options?)

Parameters#

NameType
options?EventEmitterOptions

Inherited from#

EventEmitter.constructor

Defined in#

node_modules/@types/node/events.d.ts:23

Properties#

captureRejectionSymbol#

Static Readonly captureRejectionSymbol: typeof captureRejectionSymbol

Inherited from#

EventEmitter.captureRejectionSymbol

Defined in#

node_modules/@types/node/events.d.ts:43


captureRejections#

Static captureRejections: boolean

Sets or gets the default captureRejection value for all emitters.

Inherited from#

EventEmitter.captureRejections

Defined in#

node_modules/@types/node/events.d.ts:49


defaultMaxListeners#

Static defaultMaxListeners: number

Inherited from#

EventEmitter.defaultMaxListeners

Defined in#

node_modules/@types/node/events.d.ts:50


errorMonitor#

Static Readonly errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted, therefore the process will still crash if no regular 'error' listener is installed.

Inherited from#

EventEmitter.errorMonitor

Defined in#

node_modules/@types/node/events.d.ts:42

Methods#

addEventListener#

addEventListener(type, listener): void

Parameters#

NameType
typestring
listener(...args: any[]) => void

Returns#

void

Defined in#

packages/webrtc/src/helper.ts:37


addListener#

addListener(event, listener): EventTarget

Parameters#

NameType
eventstring | symbol
listener(...args: any[]) => void

Returns#

EventTarget

Inherited from#

EventEmitter.addListener

Defined in#

node_modules/@types/node/events.d.ts:62


emit#

emit(event, ...args): boolean

Parameters#

NameType
eventstring | symbol
...argsany[]

Returns#

boolean

Inherited from#

EventEmitter.emit

Defined in#

node_modules/@types/node/events.d.ts:72


eventNames#

eventNames(): (string | symbol)[]

Returns#

(string | symbol)[]

Inherited from#

EventEmitter.eventNames

Defined in#

node_modules/@types/node/events.d.ts:77


getMaxListeners#

getMaxListeners(): number

Returns#

number

Inherited from#

EventEmitter.getMaxListeners

Defined in#

node_modules/@types/node/events.d.ts:69


listenerCount#

listenerCount(event): number

Parameters#

NameType
eventstring | symbol

Returns#

number

Inherited from#

EventEmitter.listenerCount

Defined in#

node_modules/@types/node/events.d.ts:73


listeners#

listeners(event): Function[]

Parameters#

NameType
eventstring | symbol

Returns#

Function[]

Inherited from#

EventEmitter.listeners

Defined in#

node_modules/@types/node/events.d.ts:70


off#

off(event, listener): EventTarget

Parameters#

NameType
eventstring | symbol
listener(...args: any[]) => void

Returns#

EventTarget

Inherited from#

EventEmitter.off

Defined in#

node_modules/@types/node/events.d.ts:66


on#

on(event, listener): EventTarget

Parameters#

NameType
eventstring | symbol
listener(...args: any[]) => void

Returns#

EventTarget

Inherited from#

EventEmitter.on

Defined in#

node_modules/@types/node/events.d.ts:63


once#

once(event, listener): EventTarget

Parameters#

NameType
eventstring | symbol
listener(...args: any[]) => void

Returns#

EventTarget

Inherited from#

EventEmitter.once

Defined in#

node_modules/@types/node/events.d.ts:64


prependListener#

prependListener(event, listener): EventTarget

Parameters#

NameType
eventstring | symbol
listener(...args: any[]) => void

Returns#

EventTarget

Inherited from#

EventEmitter.prependListener

Defined in#

node_modules/@types/node/events.d.ts:75


prependOnceListener#

prependOnceListener(event, listener): EventTarget

Parameters#

NameType
eventstring | symbol
listener(...args: any[]) => void

Returns#

EventTarget

Inherited from#

EventEmitter.prependOnceListener

Defined in#

node_modules/@types/node/events.d.ts:76


rawListeners#

rawListeners(event): Function[]

Parameters#

NameType
eventstring | symbol

Returns#

Function[]

Inherited from#

EventEmitter.rawListeners

Defined in#

node_modules/@types/node/events.d.ts:71


removeAllListeners#

removeAllListeners(event?): EventTarget

Parameters#

NameType
event?string | symbol

Returns#

EventTarget

Inherited from#

EventEmitter.removeAllListeners

Defined in#

node_modules/@types/node/events.d.ts:67


removeEventListener#

removeEventListener(type, listener): void

Parameters#

NameType
typestring
listener(...args: any[]) => void

Returns#

void

Defined in#

packages/webrtc/src/helper.ts:41


removeListener#

removeListener(event, listener): EventTarget

Parameters#

NameType
eventstring | symbol
listener(...args: any[]) => void

Returns#

EventTarget

Inherited from#

EventEmitter.removeListener

Defined in#

node_modules/@types/node/events.d.ts:65


setMaxListeners#

setMaxListeners(n): EventTarget

Parameters#

NameType
nnumber

Returns#

EventTarget

Inherited from#

EventEmitter.setMaxListeners

Defined in#

node_modules/@types/node/events.d.ts:68


listenerCount#

Static listenerCount(emitter, event): number

deprecated since v4.0.0

Parameters#

NameType
emitterEventEmitter
eventstring | symbol

Returns#

number

Inherited from#

EventEmitter.listenerCount

Defined in#

node_modules/@types/node/events.d.ts:31


on#

Static on(emitter, event): AsyncIterableIterator<any>

Parameters#

NameType
emitterEventEmitter
eventstring

Returns#

AsyncIterableIterator<any>

Inherited from#

EventEmitter.on

Defined in#

node_modules/@types/node/events.d.ts:28


once#

Static once(emitter, event): Promise<any[]>

Parameters#

NameType
emitterNodeEventTarget
eventstring | symbol

Returns#

Promise<any[]>

Inherited from#

EventEmitter.once

Defined in#

node_modules/@types/node/events.d.ts:26

Static once(emitter, event): Promise<any[]>

Parameters#

NameType
emitterDOMEventTarget
eventstring

Returns#

Promise<any[]>

Inherited from#

EventEmitter.once

Defined in#

node_modules/@types/node/events.d.ts:27