Missing dist build
This commit is contained in:
committed by
Jimmy Wärting
parent
9bd5261f60
commit
71f266f93e
Vendored
+10
-4
@@ -30,7 +30,7 @@
|
||||
if (typeof opts === 'undefined') opts = {
|
||||
autoBom: false
|
||||
};else if (typeof opts !== 'object') {
|
||||
console.warn('Depricated: Expected third argument to be a object');
|
||||
console.warn('Deprecated: Expected third argument to be a object');
|
||||
opts = {
|
||||
autoBom: !opts
|
||||
};
|
||||
@@ -66,7 +66,13 @@
|
||||
var xhr = new XMLHttpRequest(); // use sync to avoid popup blocker
|
||||
|
||||
xhr.open('HEAD', url, false);
|
||||
xhr.send();
|
||||
|
||||
try {
|
||||
xhr.send();
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return xhr.status >= 200 && xhr.status <= 299;
|
||||
} // `a.click()` doesn't work for all browsers (#465)
|
||||
|
||||
@@ -135,7 +141,7 @@
|
||||
} // Fallback to using FileReader and a popup
|
||||
: function saveAs(blob, name, opts, popup) {
|
||||
// Open a popup immediately do go around popup blocker
|
||||
// Mostly only avalible on user interaction and the fileReader is async so...
|
||||
// Mostly only available on user interaction and the fileReader is async so...
|
||||
popup = popup || open('', '_blank');
|
||||
|
||||
if (popup) {
|
||||
@@ -150,7 +156,7 @@
|
||||
var isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent);
|
||||
|
||||
if ((isChromeIOS || force && isSafari) && typeof FileReader === 'object') {
|
||||
// Safari doesn't allow downloading of blob urls
|
||||
// Safari doesn't allow downloading of blob URLs
|
||||
var reader = new FileReader();
|
||||
|
||||
reader.onloadend = function () {
|
||||
|
||||
Reference in New Issue
Block a user