fixed loading in ie11 (#5307)

This commit is contained in:
Andrea Bogazzi 2018-10-14 13:00:48 +02:00 committed by GitHub
parent 839b54aa25
commit 38999b867a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 21 deletions

View file

@ -464,7 +464,6 @@
*/
function parseUseDirectives(doc) {
var nodelist = _getMultipleNodes(doc, ['use', 'svg:use']), i = 0;
while (nodelist.length && i < nodelist.length) {
var el = nodelist[i],
xlink = (el.getAttribute('xlink:href') || el.getAttribute('href')).substr(1),

View file

@ -4,24 +4,6 @@
return url + (/\?/.test(url) ? '&' : '?') + param;
}
var makeXHR = (function() {
var factories = [
function() { return new fabric.window.XMLHttpRequest(); },
function() { return new ActiveXObject('Microsoft.XMLHTTP'); },
function() { return new ActiveXObject('Msxml2.XMLHTTP'); },
function() { return new ActiveXObject('Msxml2.XMLHTTP.3.0'); }
];
for (var i = factories.length; i--; ) {
try {
var req = factories[i]();
if (req) {
return factories[i];
}
}
catch (err) { }
}
})();
function emptyFn() { }
/**
@ -40,7 +22,7 @@
var method = options.method ? options.method.toUpperCase() : 'GET',
onComplete = options.onComplete || function() { },
xhr = makeXHR(),
xhr = new fabric.window.XMLHttpRequest(),
body = options.body || options.parameters;
/** @ignore */

View file

@ -491,7 +491,7 @@
*/
groupSVGElements: function(elements, options, path) {
var object;
if (elements.length === 1) {
if (elements && elements.length === 1) {
return elements[0];
}
if (options) {