diff options
author | jaubourg <j@ubourg.net> | 2011-01-13 18:33:24 +0100 |
---|---|---|
committer | jaubourg <j@ubourg.net> | 2011-01-13 18:33:24 +0100 |
commit | a8fa5f2ec1030bceb9a65d0237f0c92ae4e014dd (patch) | |
tree | 243158b0f8dd90fb52877af3a57c98885f320b8f /src/ajax/jsonp.js | |
parent | 44fc87f66ca54278e37f15885a80c2407036df57 (diff) | |
download | jquery-a8fa5f2ec1030bceb9a65d0237f0c92ae4e014dd.tar.gz jquery-a8fa5f2ec1030bceb9a65d0237f0c92ae4e014dd.zip |
Moved jQuery.ajax.prefilter and jQuery.ajax.transport to jQuery.ajaxPrefilter and jQuery.ajaxTransport so that proxying the ajax method doesn't turn into a nightmare. Thanks go to scott_gonzalez and DaveMethvin for pointing out the issue. Also made ajaxSetup return "this" to enable chainable definitions -- jQuery.ajaxSetup(...).ajaxPrefilter(...).ajaxTransport(...).
Diffstat (limited to 'src/ajax/jsonp.js')
-rw-r--r-- | src/ajax/jsonp.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ajax/jsonp.js b/src/ajax/jsonp.js index dd04b34b0..1df5dd427 100644 --- a/src/ajax/jsonp.js +++ b/src/ajax/jsonp.js @@ -10,12 +10,11 @@ jQuery.ajaxSetup({ jsonpCallback: function() { return "jsonp" + jsc++; } -}); // Normalize jsonp queries // 1) put callback parameter in url or data // 2) sneakily ensure transportDataType is always jsonp for jsonp requests -jQuery.ajax.prefilter("json jsonp", function(s, originalSettings) { +}).ajaxPrefilter("json jsonp", function(s, originalSettings) { if ( s.dataTypes[ 0 ] === "jsonp" || originalSettings.jsonp || @@ -38,7 +37,7 @@ jQuery.ajax.prefilter("json jsonp", function(s, originalSettings) { } // Bind transport to jsonp dataType -}).transport("jsonp", function(s) { +}).ajaxTransport("jsonp", function(s) { // Put callback in place var responseContainer, |