summaryrefslogtreecommitdiff
path: root/node_modules/abort-controller/polyfill.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/abort-controller/polyfill.mjs')
-rw-r--r--node_modules/abort-controller/polyfill.mjs19
1 files changed, 19 insertions, 0 deletions
diff --git a/node_modules/abort-controller/polyfill.mjs b/node_modules/abort-controller/polyfill.mjs
new file mode 100644
index 0000000..0602a64
--- /dev/null
+++ b/node_modules/abort-controller/polyfill.mjs
@@ -0,0 +1,19 @@
+/*globals self, window */
+import * as ac from "./dist/abort-controller"
+
+/*eslint-disable @mysticatea/prettier */
+const g =
+ typeof self !== "undefined" ? self :
+ typeof window !== "undefined" ? window :
+ typeof global !== "undefined" ? global :
+ /* otherwise */ undefined
+/*eslint-enable @mysticatea/prettier */
+
+if (g) {
+ if (typeof g.AbortController === "undefined") {
+ g.AbortController = ac.AbortController
+ }
+ if (typeof g.AbortSignal === "undefined") {
+ g.AbortSignal = ac.AbortSignal
+ }
+}