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 (parent:
84dd82e
)
There's enough logic going on in jQuery.ajaxSettings.xhr to warrant splitting the...
author
jeresig
<jeresig@gmail.com>
Thu, 7 Jan 2010 15:00:55 +0000
(10:00 -0500)
committer
jeresig
<jeresig@gmail.com>
Thu, 7 Jan 2010 15:00:55 +0000
(10:00 -0500)
src/ajax.js
patch
|
blob
|
history
diff --git
a/src/ajax.js
b/src/ajax.js
index
9501e8a
..
35d83e4
100644
(file)
--- a/
src/ajax.js
+++ b/
src/ajax.js
@@
-178,16
+178,15
@@
jQuery.extend({
// implement the XMLHttpRequest in IE7 (can't request local files),
// so we use the ActiveXObject when it is available
// This function can be overriden by calling jQuery.ajaxSetup
// implement the XMLHttpRequest in IE7 (can't request local files),
// so we use the ActiveXObject when it is available
// This function can be overriden by calling jQuery.ajaxSetup
- xhr: function() {
- if ( window.XMLHttpRequest && (window.location.protocol !== "file:" || !window.ActiveXObject) ) {
+ xhr: window.XMLHttpRequest && (window.location.protocol !== "file:" || !window.ActiveXObject) ?
+ function() {
return new window.XMLHttpRequest();
return new window.XMLHttpRequest();
-
- } else {
+ } :
+ function() {
try {
return new window.ActiveXObject("Microsoft.XMLHTTP");
} catch(e) {}
try {
return new window.ActiveXObject("Microsoft.XMLHTTP");
} catch(e) {}
- }
- },
+ },
accepts: {
xml: "application/xml, text/xml",
html: "text/html",
accepts: {
xml: "application/xml, text/xml",
html: "text/html",