Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

abortcontroller-polyfill eventing isn't implemented properly #800

Closed
benlesh opened this issue Jul 15, 2020 · 3 comments · Fixed by #814
Closed

abortcontroller-polyfill eventing isn't implemented properly #800

benlesh opened this issue Jul 15, 2020 · 3 comments · Fixed by #814
Assignees

Comments

@benlesh
Copy link

benlesh commented Jul 15, 2020

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.

@benlesh
Copy link
Author

benlesh commented Jul 15, 2020

NOTE: This issue was reported last year to the abortcontroller-polyfill repository here: mo/abortcontroller-polyfill#36

@JakeChampion
Copy link
Owner

@benlesh Thank you for raising this issue, I made a pull-request to update the readme to mention the polyfill you have written instead. Do you think that is ok? #814

@benlesh
Copy link
Author

benlesh commented Jul 30, 2020

LGTM.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 27, 2021
cr313 added a commit to cr313/fetch-Js-flow that referenced this issue Apr 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants