X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fajax.js;h=78d9b24f1565f8913c3e8ae8f6bbba9a71802a09;hb=747ba7defd82bffa6c7ccb69e53b834cbfddb62c;hp=47f243e55a4492f0126835a602b627132e45cf27;hpb=c34a62f8abbd9598e7a6647754c449ce92418b3a;p=jquery.git diff --git a/src/ajax.js b/src/ajax.js index 47f243e..78d9b24 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -1,3 +1,5 @@ +(function( jQuery ) { + var jsc = jQuery.now(), rscript = //gi, rselectTextarea = /select|textarea/i, @@ -484,7 +486,7 @@ jQuery.extend({ // Send the data try { - xhr.send( type === "POST" || type === "PUT" || type === "DELETE" ? s.data : null ); + xhr.send( (type !== "GET" && s.data) || null ); } catch( sendError ) { jQuery.ajax.handleError( s, xhr, null, e ); @@ -684,5 +686,10 @@ jQuery.extend( jQuery.ajax, { }); +// Does this browser support XHR requests? +jQuery.support.ajax = !!jQuery.ajaxSettings.xhr(); + // For backwards compatibility jQuery.extend( jQuery.ajax ); + +})( jQuery );