Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
c119a80e
Commit
c119a80e
authored
Nov 17, 2006
by
Jörn Zaefferer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added async option (ticket #367)
parent
1e620109
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
ajax.js
src/ajax/ajax.js
+6
-2
No files found.
src/ajax/ajax.js
View file @
c119a80e
...
@@ -632,6 +632,9 @@ jQuery.extend({
...
@@ -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({
...
@@ -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({
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment