mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-03-16 22:10:32 +00:00
fixed loading in ie11 (#5307)
This commit is contained in:
parent
839b54aa25
commit
38999b867a
3 changed files with 2 additions and 21 deletions
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue