git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
1e62010
)
Added async option (ticket #367)
author
Jörn Zaefferer
<joern.zaefferer@gmail.com>
Fri, 17 Nov 2006 10:15:31 +0000
(10:15 +0000)
committer
Jörn Zaefferer
<joern.zaefferer@gmail.com>
Fri, 17 Nov 2006 10:15:31 +0000
(10:15 +0000)
src/ajax/ajax.js
patch
|
blob
|
history
diff --git
a/src/ajax/ajax.js
b/src/ajax/ajax.js
index
198685c
..
686aa55
100644
(file)
--- a/
src/ajax/ajax.js
+++ b/
src/ajax/ajax.js
@@
-632,6
+632,9
@@
jQuery.extend({
* content-type "application/x-www-form-urlencoded". If you want to send DOMDocuments,
* set this option to false.
*
* 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",
* @example $.ajax({
* type: "GET",
* url: "test.js",
@@
-716,7
+719,8
@@
jQuery.extend({
url: null,
data: null,
contentType: "application/x-www-form-urlencoded",
url: null,
data: null,
contentType: "application/x-www-form-urlencoded",
- processData: true
+ processData: true,
+ async: true
}, s);
// if data available
}, s);
// if data available
@@
-740,7
+744,7
@@
jQuery.extend({
var xml = new XMLHttpRequest();
// Open the socket
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 )
// Set the correct header, if data is being sent
if ( s.data )