Changed JQueryAjaxSettings.jsonp to any

We can not only pass a string in jsonp to be used as callback function query parameter name but also false to skip including the callback parameter at all. http://api.jquery.com/jQuery.ajax/
This commit is contained in:
Anand Prakash
2014-01-27 16:32:12 -08:00
parent 239e30308e
commit 663624b659
+1 -1
View File
@@ -99,7 +99,7 @@ interface JQueryAjaxSettings {
/**
* Override the callback function name in a jsonp request. This value will be used instead of 'callback' in the 'callback=?' part of the query string in the url. So {jsonp:'onJSONPLoad'} would result in 'onJSONPLoad=?' passed to the server. As of jQuery 1.5, setting the jsonp option to false prevents jQuery from adding the "?callback" string to the URL or attempting to use "=?" for transformation. In this case, you should also explicitly set the jsonpCallback setting. For example, { jsonp: false, jsonpCallback: "callbackName" }
*/
jsonp?: string;
jsonp?: any;
/**
* Specify the callback function name for a JSONP request. This value will be used instead of the random name automatically generated by jQuery. It is preferable to let jQuery generate a unique name as it'll make it easier to manage the requests and provide callbacks and error handling. You may want to specify the callback when you want to enable better browser caching of GET requests. As of jQuery 1.5, you can also use a function for this setting, in which case the value of jsonpCallback is set to the return value of that function.
*/