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:
24eb176
)
jquery ajax: passing the settings object to httpData instead of just the dataFilter...
author
Ariel Flesler
<aflesler@gmail.com>
Thu, 5 Jun 2008 20:00:50 +0000
(20:00 +0000)
committer
Ariel Flesler
<aflesler@gmail.com>
Thu, 5 Jun 2008 20:00:50 +0000
(20:00 +0000)
src/ajax.js
patch
|
blob
|
history
diff --git
a/src/ajax.js
b/src/ajax.js
index
d7237fc
..
dbe731b
100644
(file)
--- a/
src/ajax.js
+++ b/
src/ajax.js
@@
-336,7
+336,7
@@
jQuery.extend({
// Watch for, and catch, XML document parse errors
try {
// process the data (runs the xml through httpData regardless of callback)
// Watch for, and catch, XML document parse errors
try {
// process the data (runs the xml through httpData regardless of callback)
- data = jQuery.httpData( xhr, s.dataType, s.dataFilter );
+ data = jQuery.httpData( xhr, s.dataType, s );
} catch(e) {
status = "parsererror";
}
} catch(e) {
status = "parsererror";
}
@@
-460,7
+460,7
@@
jQuery.extend({
return false;
},
return false;
},
- httpData: function( xhr, type, filter ) {
+ httpData: function( xhr, type, s ) {
var ct = xhr.getResponseHeader("content-type"),
xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0,
data = xml ? xhr.responseXML : xhr.responseText;
var ct = xhr.getResponseHeader("content-type"),
xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0,
data = xml ? xhr.responseXML : xhr.responseText;
@@
-469,8
+469,8
@@
jQuery.extend({
throw "parsererror";
// Allow a pre-filtering function to sanitize the response
throw "parsererror";
// Allow a pre-filtering function to sanitize the response
- if( filter )
- data = filter( data, type );
+ if( s.dataFilter )
+ data = s.dataFilter( data, type );
// If the type is "script", eval it in global context
if ( type == "script" )
// If the type is "script", eval it in global context
if ( type == "script" )