- Notifications
You must be signed in to change notification settings - Fork20.6k
Closed
Description
This is theXMLHttpRequest
object detection code:
https://github.com/jquery/jquery/blob/master/src/ajax/xhr.js
jQuery.ajaxSettings.xhr=function(){try{returnnewXMLHttpRequest();}catch(e){}};...xhrSupported=jQuery.ajaxSettings.xhr();...support.cors=!!xhrSupported&&("withCredentials"inxhrSupported);support.ajax=xhrSupported=!!xhrSupported;
support.ajax
is used nowhere in the code and is not documented,XMLHttpRequest
object is supported in all modern browsers (including Android 2.3, iOS 6.1, Opera 12 and IE 9 —caniuse.com).
Why not removexhrSupported
variable together withsupport.ajax
andtry-catch
block?