Merge pull request #1950 from rmontroy/ms-IE

Remove support for IE < 11 (#1863)
This commit is contained in:
Mark Salsbery 2021-03-10 16:15:44 -08:00 committed by GitHub
commit 145d742760
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 45 deletions

View File

@ -34,7 +34,7 @@ OPENSEADRAGON CHANGELOG
* MouseTracker: added contextMenuHandler option for handling contextmenu events (#1872 @msalsbery) * MouseTracker: added contextMenuHandler option for handling contextmenu events (#1872 @msalsbery)
* Viewer: added a canvas-contextmenu event (#1872 @msalsbery) * Viewer: added a canvas-contextmenu event (#1872 @msalsbery)
* Added additional documentation for the zoomPerSecond viewer option (#1872 @msalsbery) * Added additional documentation for the zoomPerSecond viewer option (#1872 @msalsbery)
* MouseTracker: Per #1863, dropped support for Internet Explorer < 11 (#1872 @msalsbery) * MouseTracker: Per #1863, dropped support for Internet Explorer < 11 (#1872 @msalsbery) (#1950 @rmontroy)
* Fixed simulated drag events in navigator tests (#1949 @msalsbery) * Fixed simulated drag events in navigator tests (#1949 @msalsbery)
2.4.2: 2.4.2:

View File

@ -2298,40 +2298,8 @@ function OpenSeadragon( options ){
request.onreadystatechange = function(){}; request.onreadystatechange = function(){};
if (window.XDomainRequest) { // IE9 or IE8 might as well try to use XDomainRequest if ( $.isFunction( onError ) ) {
var xdr = new window.XDomainRequest(); onError( request, e );
if (xdr) {
xdr.onload = function (e) {
if ( $.isFunction( onSuccess ) ) {
onSuccess({ // Faking an xhr object
responseText: xdr.responseText,
status: 200, // XDomainRequest doesn't support status codes, so we just fake one! :/
statusText: 'OK'
});
}
};
xdr.onerror = function (e) {
if ($.isFunction(onError)) {
onError({ // Faking an xhr object
responseText: xdr.responseText,
status: 444, // 444 No Response
statusText: 'An error happened. Due to an XDomainRequest deficiency we can not extract any information about this error. Upgrade your browser.'
});
}
};
try {
xdr.open('GET', url);
xdr.send();
} catch (e2) {
if ( $.isFunction( onError ) ) {
onError( request, e );
}
}
}
} else {
if ( $.isFunction( onError ) ) {
onError( request, e );
}
} }
} }
@ -2470,16 +2438,7 @@ function OpenSeadragon( options ){
* @returns {Object} * @returns {Object}
*/ */
parseJSON: function(string) { parseJSON: function(string) {
if (window.JSON && window.JSON.parse) { $.parseJSON = window.JSON.parse;
$.parseJSON = window.JSON.parse;
} else {
// Should only be used by IE8 in non standards mode
$.parseJSON = function(string) {
/*jshint evil:true*/
//eslint-disable-next-line no-eval
return eval('(' + string + ')');
};
}
return $.parseJSON(string); return $.parseJSON(string);
}, },