Skip to content

Commit

Permalink
Added async option (ticket #367)
Browse files Browse the repository at this point in the history
  • Loading branch information
jzaefferer committed Nov 17, 2006
1 parent 1e62010 commit c119a80
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/ajax/ajax.js
Expand Up @@ -632,6 +632,9 @@ jQuery.extend({
* content-type "application/x-www-form-urlencoded". If you want to send DOMDocuments,
* set this option to false.
*
* (Boolean) async - By default, all requests are send asynchronous (set to true).
* If you need synchronous requests, set this option to false.
*
* @example $.ajax({
* type: "GET",
* url: "test.js",
Expand Down Expand Up @@ -716,7 +719,8 @@ jQuery.extend({
url: null,
data: null,
contentType: "application/x-www-form-urlencoded",
processData: true
processData: true,
async: true
}, s);

// if data available
Expand All @@ -740,7 +744,7 @@ jQuery.extend({
var xml = new XMLHttpRequest();

// Open the socket
xml.open(s.type, s.url, true);
xml.open(s.type, s.url, s.async);

// Set the correct header, if data is being sent
if ( s.data )
Expand Down

0 comments on commit c119a80

Please sign in to comment.