mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-12 22:50:10 +08:00
Summary: This adds https://github.com/mysticatea/abort-controller to polyfill [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController). This is used to cancel requests when using `fetch`. This also updates `event-target-shim` to 5.0 to make sure we only have one version of this dependency. This updates required adding a polyfill for `console.assert` which is used by the new version. I made one based on https://github.com/gskinner/console-polyfill/blob/master/console.js#L74. The polyfill is very small, especially since we already use `event-target-shim` so I think it makes sense to include in core. Depends on #24418 so that the fetch polyfill supports the `signal` parameter. Fixes #18115 [General] [Added] - Add support for cancelling fetch requests with AbortController Pull Request resolved: https://github.com/facebook/react-native/pull/24419 Differential Revision: D14912858 Pulled By: cpojer fbshipit-source-id: 8a6402910398db51e2f3e3262f07aabdf68fcf72