-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Hello,
I am porting code from NodeJS to browser. In NodeJS I use require('events').on (do not confuse with require('events').EventEmitter.on).
events.on is available since NodeJS v13.6.0 and returns <AsyncIterator> that iterates eventName events emitted by the emitter. It support option signal which can be used to cancel awaiting events. See details: https://nodejs.org/docs/latest-v16.x/api/events.html#events_events_on_emitter_eventname_options
I would like replace events.on with EventIterator, but it lack support signal aborting eg. via AbortController. AbortController is standard interface in browser and have raising deployment in NodeJS too. In NodeJS class AbortController is added in NodeJS v15.0.0 and since v15.4.0 is no longer experimental. See details: https://nodejs.org/api/globals.html#globals_class_abortcontroller
Is AbortController support in your area of interest?