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:
3129306
)
jquery ajax: closes #3087, #2167, #2128. The ajax transport creation process is expos...
author
Ariel Flesler
<aflesler@gmail.com>
Mon, 4 Aug 2008 14:18:06 +0000
(14:18 +0000)
committer
Ariel Flesler
<aflesler@gmail.com>
Mon, 4 Aug 2008 14:18:06 +0000
(14:18 +0000)
src/ajax.js
patch
|
blob
|
history
diff --git
a/src/ajax.js
b/src/ajax.js
index
853bcbb
..
441a7b9
100644
(file)
--- a/
src/ajax.js
+++ b/
src/ajax.js
@@
-97,6
+97,7
@@
jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".sp
var jsc = now();
jQuery.extend({
var jsc = now();
jQuery.extend({
+
get: function( url, data, callback, type ) {
// shift arguments if data argument was ommited
if ( jQuery.isFunction( data ) ) {
get: function( url, data, callback, type ) {
// shift arguments if data argument was ommited
if ( jQuery.isFunction( data ) ) {
@@
-112,6
+113,13
@@
jQuery.extend({
dataType: type
});
},
dataType: type
});
},
+
+ // Create the request object; Microsoft failed to properly
+ // implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available
+ getAjaxTransport : function() {
+ return window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
+ },
+
getScript: function( url, callback ) {
return jQuery.get(url, null, callback, "script");
getScript: function( url, callback ) {
return jQuery.get(url, null, callback, "script");
@@
-273,9
+281,8
@@
jQuery.extend({
var requestDone = false;
var requestDone = false;
- // Create the request object; Microsoft failed to properly
- // implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available
- var xhr = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
+ // Create the request object
+ var xhr = jQuery.getAjaxTransport();
// Open the socket
// Passing null username, generates a login popup on Opera (#2865)
// Open the socket
// Passing null username, generates a login popup on Opera (#2865)