EventEmitter

object EventEmitter
Companion
class
class Object
trait Matchable
class Any

Value members

Concrete methods

@JSImport("node:events", "EventEmitter.captureRejections") @native
def captureRejections: Boolean

Sets or gets the default captureRejection value for all emitters.

Sets or gets the default captureRejection value for all emitters.

@inline
def captureRejections_=(x: Boolean): Unit
@JSImport("node:events", "EventEmitter.defaultMaxListeners") @native
def defaultMaxListeners: Double
@inline
def defaultMaxListeners_=(x: Double): Unit
@inline
def getEventListener(emitter: DOMEventTarget, name: String): Array[Function]

Returns a list listener for a specific emitter event name.

Returns a list listener for a specific emitter event name.

@inline
def getEventListener(emitter: DOMEventTarget, name: Symbol): Array[Function]
@inline
def getEventListener(emitter: EventEmitter, name: String): Array[Function]
@inline
def getEventListener(emitter: EventEmitter, name: Symbol): Array[Function]
@inline
def listenerCount(emitter: EventEmitter, event: String): Double
@inline
def listenerCount(emitter: EventEmitter, event: Symbol): Double
@inline
def on(emitter: EventEmitter, event: String): AsyncIterableIterator[Any]
@inline
def on(emitter: EventEmitter, event: String, options: StaticEventEmitterOptions): AsyncIterableIterator[Any]
@inline
def once(emitter: DOMEventTarget, event: String): Promise[Array[Any]]
@inline
def once(emitter: DOMEventTarget, event: String, options: StaticEventEmitterOptions): Promise[Array[Any]]
@inline
def once(emitter: NodeEventTarget, event: String): Promise[Array[Any]]
@inline
def once(emitter: NodeEventTarget, event: String, options: StaticEventEmitterOptions): Promise[Array[Any]]
@inline
def once(emitter: NodeEventTarget, event: Symbol): Promise[Array[Any]]
@inline
def once(emitter: NodeEventTarget, event: Symbol, options: StaticEventEmitterOptions): Promise[Array[Any]]

Concrete fields

@JSImport("node:events", "EventEmitter") @native
val ^: Any
@JSImport("node:events", "EventEmitter.captureRejectionSymbol") @native
@JSImport("node:events", "EventEmitter.errorMonitor") @native
val errorMonitor: Symbol

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.

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.