abortcontroller-polyfill
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -211,4 +211,14 @@ (function (global, factory) { | ||
function hasBrokenNativeAbortController(userAgent) { | ||
if (userAgent.match(/ (crios|gsa|fxios)\//i)) { | ||
return true; | ||
} | ||
if (userAgent.match(/ Safari\//i) && (userAgent.match(/ Version\/12.0/i) || userAgent.match(/ Version\/12.1/i))) { | ||
return true; | ||
} | ||
return false; | ||
} | ||
function nativeAbortControllerIsBroken(self) { | ||
return self.navigator && (self.navigator.vendor && self.navigator.vendor.startsWith('Apple Computer') || self.navigator.userAgent && self.navigator.userAgent.match(/ (crios|gsa|fxios)\//i)); | ||
return self.navigator && self.navigator.userAgent && hasBrokenNativeAbortController(self.navigator.userAgent); | ||
} | ||
@@ -215,0 +225,0 @@ |
@@ -298,4 +298,14 @@ (function (global, factory) { | ||
function hasBrokenNativeAbortController(userAgent) { | ||
if (userAgent.match(/ (crios|gsa|fxios)\//i)) { | ||
return true; | ||
} | ||
if (userAgent.match(/ Safari\//i) && (userAgent.match(/ Version\/12.0/i) || userAgent.match(/ Version\/12.1/i))) { | ||
return true; | ||
} | ||
return false; | ||
} | ||
function nativeAbortControllerIsBroken(self) { | ||
return self.navigator && (self.navigator.vendor && self.navigator.vendor.startsWith('Apple Computer') || self.navigator.userAgent && self.navigator.userAgent.match(/ (crios|gsa|fxios)\//i)); | ||
return self.navigator && self.navigator.userAgent && hasBrokenNativeAbortController(self.navigator.userAgent); | ||
} | ||
@@ -302,0 +312,0 @@ |
@@ -298,4 +298,14 @@ (function (global, factory) { | ||
function hasBrokenNativeAbortController(userAgent) { | ||
if (userAgent.match(/ (crios|gsa|fxios)\//i)) { | ||
return true; | ||
} | ||
if (userAgent.match(/ Safari\//i) && (userAgent.match(/ Version\/12.0/i) || userAgent.match(/ Version\/12.1/i))) { | ||
return true; | ||
} | ||
return false; | ||
} | ||
function nativeAbortControllerIsBroken(self) { | ||
return self.navigator && (self.navigator.vendor && self.navigator.vendor.startsWith('Apple Computer') || self.navigator.userAgent && self.navigator.userAgent.match(/ (crios|gsa|fxios)\//i)); | ||
return self.navigator && self.navigator.userAgent && hasBrokenNativeAbortController(self.navigator.userAgent); | ||
} | ||
@@ -302,0 +312,0 @@ |
{ | ||
"name": "abortcontroller-polyfill", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "Polyfill/ponyfill for the AbortController DOM API + optional patching of fetch (stub that calls catch, doesn't actually abort request).", | ||
@@ -5,0 +5,0 @@ "main": "dist/umd-polyfill.js", |
@@ -0,6 +1,17 @@ | ||
function hasBrokenNativeAbortController(userAgent) { | ||
if (userAgent.match(/ (crios|gsa|fxios)\//i)) { | ||
return true; | ||
} | ||
if (userAgent.match(/ Safari\//i) && ( | ||
userAgent.match(/ Version\/12.0/i) || | ||
userAgent.match(/ Version\/12.1/i) | ||
)) { | ||
return true; | ||
} | ||
return false; | ||
} | ||
export function nativeAbortControllerIsBroken(self) { | ||
return self.navigator && ( | ||
(self.navigator.vendor && self.navigator.vendor.startsWith('Apple Computer')) || | ||
(self.navigator.userAgent && self.navigator.userAgent.match(/ (crios|gsa|fxios)\//i)) | ||
); | ||
return self.navigator && self.navigator.userAgent && | ||
hasBrokenNativeAbortController(self.navigator.userAgent); | ||
} |
59431
1457