diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2006-11-17 14:49:44 +0000 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2006-11-17 14:49:44 +0000 |
commit | cb0fbbbac1ccad88fe548d9e1fe2b8d791098eb0 (patch) | |
tree | 633fb8de326f9394cc782f2d9c5e53ec00a5dde1 /src | |
parent | c119a80ea37a6940ec55dfb7b9f9b296800c7928 (diff) | |
download | jquery-cb0fbbbac1ccad88fe548d9e1fe2b8d791098eb0.tar.gz jquery-cb0fbbbac1ccad88fe548d9e1fe2b8d791098eb0.zip |
Return XMLHttpRequest from $.ajax() to allow aborting etc.
Diffstat (limited to 'src')
-rw-r--r-- | src/ajax/ajax.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ajax/ajax.js b/src/ajax/ajax.js index 686aa5524..80127339e 100644 --- a/src/ajax/ajax.js +++ b/src/ajax/ajax.js @@ -586,6 +586,10 @@ jQuery.extend({ * means of making AJAX requests using jQuery. $.ajax() takes one property, * an object of key/value pairs, that're are used to initalize the request. * + * $.ajax() returns the XMLHttpRequest that it creates. In most cases you won't + * need that object to manipulate directly, but it is available if you need to + * abort the request manually. + * * These are all the key/values that can be passed in to 'prop': * * (String) type - The type of request to make (e.g. "POST" or "GET"). @@ -701,7 +705,7 @@ jQuery.extend({ * }); * * @name $.ajax - * @type undefined + * @type XMLHttpRequest * @param Hash prop A set of properties to initialize the request with. * @cat AJAX */ @@ -836,6 +840,9 @@ jQuery.extend({ // Send the data xml.send(s.data); + + // return XMLHttpRequest to allow aborting the request etc. + return xml; }, // Counter for holding the number of active queries |