-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Implement abort #547
Comments
just a reference: https://github.com/mo/abortcontroller-polyfill/blob/master/src/abortcontroller.js#L8-L47 |
@lukeapage @mislav whatwg/fetch#523 just got merged |
Yep, I've been following. Good news. |
I quite dig the polyfill that @jimmywarting shared. Does anyone think that this project should include that kind of polyfill? Should we try to patch native |
You should try calling xhr.abort to not wast bandwidth |
I agree with @mislav 's and @jimmywarting 's suggestions over in #572 that keeping the AbortController and AbortSignal polyfills separate from this library seems preferable.
I think so. You may already be thinking this, but it would probably be a breaking change to the API, as this library would start polyfilling many more apps than it currently does. This might warrant a major version bump if this lib follows semver.
It would be pretty cool to see this library update to accept a (duck-typed) A quick glance at the code suggests to me that this should be straightforward to implement. Perhaps the hardest part will be updating the feature detection code. I wrote a quick snippet that seems like a step in the right direction. I tested it in Safari, Chrome, and Firefox, and got the expected results (no, no, yes, respectively). What do folks think? |
As per whatwg/fetch#523
I guess it should wait till the above is merged.
The text was updated successfully, but these errors were encountered: