UNPKG

abortcontroller-polyfill

Version:

Polyfill/ponyfill for the AbortController DOM API + optional patching of fetch (stub that calls catch, doesn't actually abort request).

14 lines (10 loc) 318 B
import AbortController, { AbortSignal } from './abortcontroller'; import { polyfillNeeded } from './utils'; (function (self) { 'use strict'; if (!polyfillNeeded(self)) { return; } self.AbortController = AbortController; self.AbortSignal = AbortSignal; })(typeof self !== 'undefined' ? self : global);