mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-01-31 23:21:42 +03:00
Now trying standard path first in createAjaxRequest
As suggested by @cskwg in #98
This commit is contained in:
parent
3b93032d71
commit
c3772df011
@ -1265,11 +1265,12 @@ window.OpenSeadragon = window.OpenSeadragon || function( options ){
|
|||||||
createAjaxRequest: function(){
|
createAjaxRequest: function(){
|
||||||
var request;
|
var request;
|
||||||
|
|
||||||
if ( window.ActiveXObject ) {
|
if ( window.XMLHttpRequest ) {
|
||||||
//TODO: very bad...Why check every time using try/catch when
|
$.createAjaxRequest = function( ){
|
||||||
// we could determine once at startup which activeX object
|
return new XMLHttpRequest();
|
||||||
// was supported. This will have significant impact on
|
};
|
||||||
// performance for IE Browsers DONE
|
request = new XMLHttpRequest();
|
||||||
|
} else if ( window.ActiveXObject ) {
|
||||||
/*jshint loopfunc:true*/
|
/*jshint loopfunc:true*/
|
||||||
for ( i = 0; i < ACTIVEX.length; i++ ) {
|
for ( i = 0; i < ACTIVEX.length; i++ ) {
|
||||||
try {
|
try {
|
||||||
@ -1282,11 +1283,6 @@ window.OpenSeadragon = window.OpenSeadragon || function( options ){
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if ( window.XMLHttpRequest ) {
|
|
||||||
$.createAjaxRequest = function( ){
|
|
||||||
return new XMLHttpRequest();
|
|
||||||
};
|
|
||||||
request = new XMLHttpRequest();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !request ) {
|
if ( !request ) {
|
||||||
@ -1295,6 +1291,8 @@ window.OpenSeadragon = window.OpenSeadragon || function( options ){
|
|||||||
|
|
||||||
return request;
|
return request;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes an AJAX request.
|
* Makes an AJAX request.
|
||||||
* @function
|
* @function
|
||||||
|
Loading…
x
Reference in New Issue
Block a user