UNPKG

535 BJavaScriptView Raw
1/*globals self, window */
2import * as ac from "./dist/abort-controller"
3
4/*eslint-disable @mysticatea/prettier */
5const g =
6 typeof self !== "undefined" ? self :
7 typeof window !== "undefined" ? window :
8 typeof global !== "undefined" ? global :
9 /* otherwise */ undefined
10/*eslint-enable @mysticatea/prettier */
11
12if (g) {
13 if (typeof g.AbortController === "undefined") {
14 g.AbortController = ac.AbortController
15 }
16 if (typeof g.AbortSignal === "undefined") {
17 g.AbortSignal = ac.AbortSignal
18 }
19}