Added async option (ticket #367)
This commit is contained in:
parent
1e620109d7
commit
c119a80ea3
|
@ -632,6 +632,9 @@ jQuery.extend({
|
||||||
* content-type "application/x-www-form-urlencoded". If you want to send DOMDocuments,
|
* content-type "application/x-www-form-urlencoded". If you want to send DOMDocuments,
|
||||||
* set this option to false.
|
* 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({
|
* @example $.ajax({
|
||||||
* type: "GET",
|
* type: "GET",
|
||||||
* url: "test.js",
|
* url: "test.js",
|
||||||
|
@ -716,7 +719,8 @@ jQuery.extend({
|
||||||
url: null,
|
url: null,
|
||||||
data: null,
|
data: null,
|
||||||
contentType: "application/x-www-form-urlencoded",
|
contentType: "application/x-www-form-urlencoded",
|
||||||
processData: true
|
processData: true,
|
||||||
|
async: true
|
||||||
}, s);
|
}, s);
|
||||||
|
|
||||||
// if data available
|
// if data available
|
||||||
|
@ -740,7 +744,7 @@ jQuery.extend({
|
||||||
var xml = new XMLHttpRequest();
|
var xml = new XMLHttpRequest();
|
||||||
|
|
||||||
// Open the socket
|
// 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
|
// Set the correct header, if data is being sent
|
||||||
if ( s.data )
|
if ( s.data )
|
||||||
|
|
Loading…
Reference in a new issue