Skip to content

abortcontroller-polyfill eventing isn't implemented properly #800

@benlesh

Description

@benlesh

I needed an AbortSignal/AbortController polyfill for work on RxJS, and I found out that the event dispatching in abortcontroll-polyfill (the recommended abort mechanism for this library) was not properly synchronous and didn't implement behaviors as they would actually exist in the wild. This is actually a big deal, as abort/cancellation should happen synchronously when abort() is called on the abort controller, and the order of events there is very important.

To that end, I started down the road of creating a PR for abortcontroller-polyfill, but: 1) I was almost rewriting the entire thing. and 2) That repository seemed to be somewhat stagnant and I needed a properly implemented one ASAP.

So I've created a new package called yet-another-abortcontroller-polyfill that aims to be accurate as possible when it comes to the semantics of the type and the events around it.

The problem I see is this is the defacto fetch polyfill, and if it has people polyfilling and using poorly implemented AbortSignals, it is going to break other things (like RxJS) in hard-to-explain ways for other users.

So I'd like to reconcile this somehow.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions