Add a flag to verify if a browser supports some form of XHR request. Fixes #7030.
authorJohn Resig <jeresig@gmail.com>
Mon, 13 Sep 2010 22:02:33 +0000 (18:02 -0400)
committerJohn Resig <jeresig@gmail.com>
Mon, 13 Sep 2010 22:02:33 +0000 (18:02 -0400)
src/ajax.js

index 52a5a22..78d9b24 100644 (file)
@@ -686,6 +686,9 @@ jQuery.extend( jQuery.ajax, {
 
 });
 
+// Does this browser support XHR requests?
+jQuery.support.ajax = !!jQuery.ajaxSettings.xhr();
+
 // For backwards compatibility
 jQuery.extend( jQuery.ajax );