Expand description
Node events module: EventEmitter. The emitter is an object tagged
@@native = "EventEmitter" with hidden @@on/@@once maps (event name →
listener array). emit collects listeners, releases the host borrow, then
invokes each so callbacks can re-enter the host.
Constants§
- METHODS
- The EventEmitter method names, exposed so
EventEmitter.prototypecan be enumerated / copied (express doesmixin(app, EventEmitter.prototype)to make itsappfunction an emitter). - STATIC_
METHODS - Static functions on the
eventsmodule namespace.EventEmitter(the self-ref ctor) andEventEmitterAsyncResourceare handled by the parent;on(async iterator) is deferred (see module docs / final report).
Functions§
- instance_
call - new_
emitter - Construct a fresh
EventEmitter. - static_
call - Dispatch a static
events.<method>(...). ReturnsNonefor names this module does not own (e.g.EventEmitter) so the parent’s specific arm wins.