Closed DragorWW closed 7 years ago
@mrsum what reason for close ?
@DragorWW cause you can override svgxhr.js
@mrsum Yes, I did, but does not cancel bug. for other, my code witch path for ie9:
var svgXHR = function(options) {
var url = false;
var baseUrl = undefined;
options && options.filename
? url = options.filename
: null;
if (!url) return false;
var _ajax = new XMLHttpRequest();
var _fullPath;
if (typeof baseUrl === 'undefined') {
if (typeof window.baseUrl !== 'undefined') {
baseUrl = window.baseUrl;
} else {
baseUrl = window.location.protocol + '//' + window.location.hostname + (window.location.port ? ':' + window.location.port : '');
}
}
_fullPath = (baseUrl + '/' + url).replace(/([^:]\/)\/+/g, '$1');
_ajax.open('GET', _fullPath, true);
_ajax.onprogress = function() {};
_ajax.onload = function() {
if(!_ajax.responseText || _ajax.responseText.substr(0, 4) !== "<svg") {
throw Error("Invalid SVG Response");
}
var div = document.createElement('div');
div.innerHTML = _ajax.responseText;
document.body.insertBefore(div, document.body.childNodes[0]);
};
_ajax.send();
};
module.exports = svgXHR;
The xdr.send() call is wrapped in a timeout to prevent an issue with the interface where some requests are lost if multiple XDomainRequests are being sent at the same time.
in IE9
./helpers/svgxhr.js
XDomainRequest not run callback _ajax.onload;if comment this code:
in ie9 start working loading sprite.