Skip to content

Support for AbortController #20

@ad-m

Description

@ad-m

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions