-
Notifications
You must be signed in to change notification settings - Fork 23
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
Safari's AbortController doesn't work #23
Comments
Thanks for filing this, the polyfill should be fixed so that it "just works" in Safari. I don't have time to work on this immediately but I will have a look eventually if you don't submit a PR before that. Since I havn't looked at the specifics myself yet, I don't know what the preferred solution is, but on a high level it sounds reasonable for the polyfill to feature detect the "bad AbortControll" and polyfill over it. |
I'm not sure I can help you with the detection of the "bad AbortController", but what do you think about this? if (
self.AbortController &&
(!self.navigator || !self.navigator.userAgent.match(/Safari\/[\d|.]+$/)
) {
return;
} (I added the |
@mo ping; should I send a PR with that? |
Is the AbortController also not working in Safari versions later than 12.0.1? Can we limit the "force polyfill" to certain known-bad versions? |
I tried the latest technical preview and it also has the same issue. Seems like caniuse.com incorrectly claims that AbortController is supported on Safari. @homer0 a PR with above would be great.. |
Closing ( fixed by pull #24 ) |
First of all, this is Safari's fault.
Safari
12.0.1
supportsAbortController
, so the polyfill is not applied, but it doesn't do anything.Here's a really small example I made, with a delay on the request, just in case:
If you try this out on Chrome, it works like a charm, but on Safari doesn't.
Just to test if it was a Safari issue, I went to your package and removed the following check (to apply the polyfill even if there was support):
And it worked.
Finally, the reason I'm opening the issue is to see if...
The text was updated successfully, but these errors were encountered: