Skip to content

Commit a2318a9

Browse files
bernardobelchiorcburgmer
authored andcommitted
Remove Blob and URL feature detection
1 parent 9102398 commit a2318a9

File tree

1 file changed

+9
-24
lines changed

1 file changed

+9
-24
lines changed

src/svg2image.js

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var svg2image = (function (window) {
1+
var svg2image = (function () {
22
"use strict";
33

44
var module = {};
@@ -66,31 +66,16 @@ var svg2image = (function (window) {
6666
);
6767
};
6868

69-
var supportsBlobBuilding = function () {
70-
if (window.Blob) {
71-
// Available as constructor only in newer builds for all browsers
72-
try {
73-
new Blob(["<b></b>"], { type: "text/xml" });
74-
return true;
75-
} catch (err) {}
76-
}
77-
return false;
78-
};
79-
8069
var checkBlobSupport = function () {
8170
return new Promise(function (resolve, reject) {
82-
if (supportsBlobBuilding() && window.URL) {
83-
readingBackFromCanvasBenefitsFromOldSchoolDataUris().then(
84-
function (doesBenefit) {
85-
resolve(!doesBenefit);
86-
},
87-
function () {
88-
reject();
89-
}
90-
);
91-
} else {
92-
resolve(false);
93-
}
71+
readingBackFromCanvasBenefitsFromOldSchoolDataUris().then(
72+
function (doesBenefit) {
73+
resolve(!doesBenefit);
74+
},
75+
function () {
76+
reject();
77+
}
78+
);
9479
});
9580
};
9681

0 commit comments

Comments
 (0)