Files
scriptc/packages/runtime
Chris Tate 08c7b72c2d Keep process's emitter methods as Node shows them in Node islands
The island host replaced process.on, process.addListener and
process.prependListener with separate wrappers, and process.emit with its
own, as own enumerable properties of process. Island code could see the
difference: Object.keys(process) listed the four, process.on was no
longer process.addListener, prependListener was named addListener, and
each was an own property where Node inherits it.

One wrapper now serves on and addListener, and prependListener and emit
keep their names. They are defined on process's own prototype, which
Node gives process below EventEmitter.prototype, with
EventEmitter.prototype's attributes. process has no own property for
them, so Object.keys, Object.hasOwn and for...in see what they see in
Node. for...in lists a prototype's keys before its parent's, so the
keys EventEmitter.prototype lists before the wrapped ones (_events,
_eventsCount, _maxListeners, setMaxListeners, getMaxListeners) are
defined there too, with the same values, in their order.

6891 compares the identities, names, lengths, own-ness, Object.keys and
for...in over process against Node.
2026-10-27 22:33:01 -05:00
..
2026-10-27 16:45:14 -05:00
2026-07-22 18:08:04 -05:00
2026-10-25 11:26:13 -05:00