git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added a couple missing semicolons and fixed a typo in the comments
[jquery.git]
/
src
/
ajax.js
diff --git
a/src/ajax.js
b/src/ajax.js
index
9442608
..
81225f2
100644
(file)
--- a/
src/ajax.js
+++ b/
src/ajax.js
@@
-221,7
+221,7
@@
jQuery.extend({
// Build temporary JSONP function
if ( s.dataType === "json" && (s.data && jsre.test(s.data) || jsre.test(s.url)) ) {
// Build temporary JSONP function
if ( s.dataType === "json" && (s.data && jsre.test(s.data) || jsre.test(s.url)) ) {
- jsonp = "jsonp" + jsc++;
+ jsonp = s.jsonpCallback || ("jsonp" + jsc++);
// Replace the =? sequence both in the query string and the data
if ( s.data ) {
// Replace the =? sequence both in the query string and the data
if ( s.data ) {
@@
-235,7
+235,7
@@
jQuery.extend({
s.dataType = "script";
// Handle JSONP-style loading
s.dataType = "script";
// Handle JSONP-style loading
- window[ jsonp ] = function(tmp){
+ window[ jsonp ] = window[ jsonp ] || function(tmp){
data = tmp;
success();
complete();
data = tmp;
success();
complete();
@@
-331,7
+331,7
@@
jQuery.extend({
// Need an extra try/catch for cross domain requests in Firefox 3
try {
// Set the correct header, if data is being sent
// Need an extra try/catch for cross domain requests in Firefox 3
try {
// Set the correct header, if data is being sent
- if ( s.data || origSettings.contentType ) {
+ if ( s.data || origSettings && origSettings.contentType ) {
xhr.setRequestHeader("Content-Type", s.contentType);
}
xhr.setRequestHeader("Content-Type", s.contentType);
}
@@
-430,7
+430,7
@@
jQuery.extend({
// Fire the complete handlers
complete();
// Fire the complete handlers
complete();
- if ( isTimeout ) {
+ if ( isTimeout === "timeout" ) {
xhr.abort();
}
xhr.abort();
}