polyfill.mjs 535 B

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