Hi,
thanks for this work. One very minor thing: contrary to what is stated on the readme, iOS 10 seems not to support native fetch functionalities. Maybe you could edit the Readme, for clarity.
Thanks again!
G.
It states in the README that Safari on macOS supports native fetch, but that statement is also untrue, since it didn't seem to have shipped with native support after all. I'll amend the text. Thanks for the heads-up! /cc @dgraham
Fetch API support was officially added in Safari 10.1. According to MDN fetch is supported as of 10.1, which corroborates official docs. However, Can I Use suggests otherwise.
If you window.alert(window.fetch) in Mobile Safari and it comes back undefined this polyfill will attempt to polyfill behavior using XHR -- which is what happens on iOS 10 with Safari 10.0. But in my testing this polyfill does not _properly_ add fetch support in Mobile Safari versions prior to 10.1, which may be why iOS 10 is not supported.
According to https://webkit.org/status/#specification-fetch-api the status is still "In Development". I'm following up with the contact listed in the docs and will report back when I hear a response.
Here's the official scoop on when we can expect fetch support in Safari, quoted directly from Jon Davis of Apple:
The status reported is correct. Fetch is still technically "in developmentā in WebKit, meaning changes can still happen up until the wide release to customers in Safari. Ostensibly that release will be in the forms of Safari 10.1 on macOS and Safari for iOS 10.3, both of which are currently in beta and do include support for Fetch. That means when those beta version ship to customers, Fetch will be available. Once the new products are released, the status of Fetch on the WebKit Feature Status page will change to āDoneā.
Both Can I use⦠and MDN are reporting correctly: Fetch will become available in Safari in the Safari 10.1 release that ships with macOS Sierra 10.12.4 and Safari on iOS 10.3. I hope that is helpful.
Most helpful comment
Here's the official scoop on when we can expect
fetchsupport in Safari, quoted directly from Jon Davis of Apple: