UNPKG

@adyen/adyen-platform-experience-web

Version:

![Platform Experience header](https://github.com/Adyen/adyen-platform-experience-web/assets/7926613/18094965-9e01-450e-8dc9-ea84e6b22c2b)

29 lines (28 loc) 846 B
import { enumerable as n, hasOwnProperty as o, getter as a } from "../struct/property.js"; import { DEFAULT_ABORT_ERROR_MESSAGE as i } from "./constants.js"; import { sameValue as p } from "../value/compare.js"; if (!o(AbortSignal.prototype, "reason")) try { Object.defineProperty(AbortSignal.prototype, "reason", { ...a(function() { return this.aborted ? e() : void 0; }, !0), configurable: !0 }); } catch { } o(AbortSignal.prototype, "throwIfAborted") || (AbortSignal.prototype.throwIfAborted = function() { if (this.aborted) throw this.reason ?? e(); }); const e = (r = i) => new DOMException(r, "AbortError"), s = (r, t) => { if (!p(r.reason, t)) try { Object.defineProperty(r, "reason", n(t)); } catch { } return r; }; export { e as abortError, s as augmentSignalReason };