From 515a155cf66425bd119811bc2d836ff141eb7d5d Mon Sep 17 00:00:00 2001 From: rmontroy Date: Wed, 10 Mar 2021 13:48:09 -0500 Subject: [PATCH 1/2] Remove support for IE < 11 --- src/openseadragon.js | 47 +++----------------------------------------- 1 file changed, 3 insertions(+), 44 deletions(-) diff --git a/src/openseadragon.js b/src/openseadragon.js index 1f7fbe60..f61e0133 100644 --- a/src/openseadragon.js +++ b/src/openseadragon.js @@ -2298,40 +2298,8 @@ function OpenSeadragon( options ){ request.onreadystatechange = function(){}; - if (window.XDomainRequest) { // IE9 or IE8 might as well try to use XDomainRequest - var xdr = new window.XDomainRequest(); - 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 ); - } + if ( $.isFunction( onError ) ) { + onError( request, e ); } } @@ -2470,16 +2438,7 @@ function OpenSeadragon( options ){ * @returns {Object} */ parseJSON: function(string) { - if (window.JSON && 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 + ')'); - }; - } + $.parseJSON = window.JSON.parse; return $.parseJSON(string); }, From a96e369c0f3f71833c2540416709f84adf120f53 Mon Sep 17 00:00:00 2001 From: Rob Montroy Date: Wed, 10 Mar 2021 19:04:07 -0500 Subject: [PATCH 2/2] Changelog update --- changelog.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 1c325eba..38fcc2d4 100644 --- a/changelog.txt +++ b/changelog.txt @@ -34,7 +34,7 @@ OPENSEADRAGON CHANGELOG * MouseTracker: added contextMenuHandler option for handling contextmenu events (#1872 @msalsbery) * Viewer: added a canvas-contextmenu event (#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) 2.4.2: