polyfill-service icon indicating copy to clipboard operation
polyfill-service copied to clipboard

Fetch is wrongly polyfilled for Chrome on iOS

Open nathell opened this issue 2 years ago • 0 comments

Bug report

What

Requesting https://polyfill.io/v3/polyfill.js?features=fetch on Chrome iOS returns a polyfill for fetch, even though Chrome supports the fetch API natively.

Details

To reproduce:

  1. On an iOS device, install Chrome and hit https://polyfill.io/v3/polyfill.js?features=fetch
  2. Expected result: No polyfills needed for current settings and browser
  3. Actual result: A polyfill for fetch

Tested on Chrome version 117.0.5938.117, iOS 16.6, iPhone 11.

Furthermore, the polyfill is deficient in comparison to the native implementation. Specifically, the Response object that gets passed to its promises doesn’t have a body property (that should be a ReadableStream). This is causing problems for us downstream, as it causes NPEs in the ClojureScript SSE client we use that is based on fetch.

nathell avatar Sep 29 '23 16:09 nathell