Class: EventTarget
#
HierarchyEventEmitter
↳ EventTarget
#
Constructors#
constructor• new EventTarget(options?
)
#
ParametersName | Type |
---|---|
options? | EventEmitterOptions |
#
Inherited fromEventEmitter.constructor
#
Defined innode_modules/@types/node/events.d.ts:23
#
Properties#
captureRejectionSymbol▪ Static
Readonly
captureRejectionSymbol: typeof captureRejectionSymbol
#
Inherited fromEventEmitter.captureRejectionSymbol
#
Defined innode_modules/@types/node/events.d.ts:43
#
captureRejections▪ Static
captureRejections: boolean
Sets or gets the default captureRejection value for all emitters.
#
Inherited fromEventEmitter.captureRejections
#
Defined innode_modules/@types/node/events.d.ts:49
#
defaultMaxListeners▪ Static
defaultMaxListeners: number
#
Inherited fromEventEmitter.defaultMaxListeners
#
Defined innode_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 fromEventEmitter.errorMonitor
#
Defined innode_modules/@types/node/events.d.ts:42
#
Methods#
addEventListener▸ addEventListener(type
, listener
): void
#
ParametersName | Type |
---|---|
type | string |
listener | (...args : any []) => void |
#
Returnsvoid
#
Defined inpackages/webrtc/src/helper.ts:37
#
addListener▸ addListener(event
, listener
): EventTarget
#
ParametersName | Type |
---|---|
event | string | symbol |
listener | (...args : any []) => void |
#
Returns#
Inherited fromEventEmitter.addListener
#
Defined innode_modules/@types/node/events.d.ts:62
#
emit▸ emit(event
, ...args
): boolean
#
ParametersName | Type |
---|---|
event | string | symbol |
...args | any [] |
#
Returnsboolean
#
Inherited fromEventEmitter.emit
#
Defined innode_modules/@types/node/events.d.ts:72
#
eventNames▸ eventNames(): (string
| symbol
)[]
#
Returns(string
| symbol
)[]
#
Inherited fromEventEmitter.eventNames
#
Defined innode_modules/@types/node/events.d.ts:77
#
getMaxListeners▸ getMaxListeners(): number
#
Returnsnumber
#
Inherited fromEventEmitter.getMaxListeners
#
Defined innode_modules/@types/node/events.d.ts:69
#
listenerCount▸ listenerCount(event
): number
#
ParametersName | Type |
---|---|
event | string | symbol |
#
Returnsnumber
#
Inherited fromEventEmitter.listenerCount
#
Defined innode_modules/@types/node/events.d.ts:73
#
listeners▸ listeners(event
): Function
[]
#
ParametersName | Type |
---|---|
event | string | symbol |
#
ReturnsFunction
[]
#
Inherited fromEventEmitter.listeners
#
Defined innode_modules/@types/node/events.d.ts:70
#
off▸ off(event
, listener
): EventTarget
#
ParametersName | Type |
---|---|
event | string | symbol |
listener | (...args : any []) => void |
#
Returns#
Inherited fromEventEmitter.off
#
Defined innode_modules/@types/node/events.d.ts:66
#
on▸ on(event
, listener
): EventTarget
#
ParametersName | Type |
---|---|
event | string | symbol |
listener | (...args : any []) => void |
#
Returns#
Inherited fromEventEmitter.on
#
Defined innode_modules/@types/node/events.d.ts:63
#
once▸ once(event
, listener
): EventTarget
#
ParametersName | Type |
---|---|
event | string | symbol |
listener | (...args : any []) => void |
#
Returns#
Inherited fromEventEmitter.once
#
Defined innode_modules/@types/node/events.d.ts:64
#
prependListener▸ prependListener(event
, listener
): EventTarget
#
ParametersName | Type |
---|---|
event | string | symbol |
listener | (...args : any []) => void |
#
Returns#
Inherited fromEventEmitter.prependListener
#
Defined innode_modules/@types/node/events.d.ts:75
#
prependOnceListener▸ prependOnceListener(event
, listener
): EventTarget
#
ParametersName | Type |
---|---|
event | string | symbol |
listener | (...args : any []) => void |
#
Returns#
Inherited fromEventEmitter.prependOnceListener
#
Defined innode_modules/@types/node/events.d.ts:76
#
rawListeners▸ rawListeners(event
): Function
[]
#
ParametersName | Type |
---|---|
event | string | symbol |
#
ReturnsFunction
[]
#
Inherited fromEventEmitter.rawListeners
#
Defined innode_modules/@types/node/events.d.ts:71
#
removeAllListeners▸ removeAllListeners(event?
): EventTarget
#
ParametersName | Type |
---|---|
event? | string | symbol |
#
Returns#
Inherited fromEventEmitter.removeAllListeners
#
Defined innode_modules/@types/node/events.d.ts:67
#
removeEventListener▸ removeEventListener(type
, listener
): void
#
ParametersName | Type |
---|---|
type | string |
listener | (...args : any []) => void |
#
Returnsvoid
#
Defined inpackages/webrtc/src/helper.ts:41
#
removeListener▸ removeListener(event
, listener
): EventTarget
#
ParametersName | Type |
---|---|
event | string | symbol |
listener | (...args : any []) => void |
#
Returns#
Inherited fromEventEmitter.removeListener
#
Defined innode_modules/@types/node/events.d.ts:65
#
setMaxListeners▸ setMaxListeners(n
): EventTarget
#
ParametersName | Type |
---|---|
n | number |
#
Returns#
Inherited fromEventEmitter.setMaxListeners
#
Defined innode_modules/@types/node/events.d.ts:68
#
listenerCount▸ Static
listenerCount(emitter
, event
): number
deprecated
since v4.0.0
#
ParametersName | Type |
---|---|
emitter | EventEmitter |
event | string | symbol |
#
Returnsnumber
#
Inherited fromEventEmitter.listenerCount
#
Defined innode_modules/@types/node/events.d.ts:31
#
on▸ Static
on(emitter
, event
): AsyncIterableIterator
<any>
#
ParametersName | Type |
---|---|
emitter | EventEmitter |
event | string |
#
ReturnsAsyncIterableIterator
<any>
#
Inherited fromEventEmitter.on
#
Defined innode_modules/@types/node/events.d.ts:28
#
once▸ Static
once(emitter
, event
): Promise
<any[]>
#
ParametersName | Type |
---|---|
emitter | NodeEventTarget |
event | string | symbol |
#
ReturnsPromise
<any[]>
#
Inherited fromEventEmitter.once
#
Defined innode_modules/@types/node/events.d.ts:26
▸ Static
once(emitter
, event
): Promise
<any[]>
#
ParametersName | Type |
---|---|
emitter | DOMEventTarget |
event | string |
#
ReturnsPromise
<any[]>
#
Inherited fromEventEmitter.once
#
Defined innode_modules/@types/node/events.d.ts:27