misoproject / dataset

JavaScript library that makes managing the data behind client-side visualisations easy
http://misoproject.com
GNU General Public License v2.0
1.18k stars 99 forks source link

customisable jsonp callback parameter and function #137

Closed ahume closed 12 years ago

ahume commented 12 years ago

Unless I've missed something, as far as I can tell the only way to use jsonp is to always include 'callback=' as the final thing in the url and then rely on the service being called to support 'callback' as a parameter (or to have hardcoded 'callback' as the wrapping function).

That's useful as a convention, but it might be nice if either:

a) It was explicit in the documentation that this is the case. I spent a while assuming I could - and trying to figure out how - to set a callback parameter name. b) Was actually customisable. So I can make requests with &myOwnCallbackParam=myOwnCallbackFunctionName.

alexgraul commented 12 years ago

Yea was a bit awkward and undocumented. Will update the documentation when we release a new version next week. Now supports setting the callback via a param or the url or not at all, in which case it's generated.