This is a JSONp, and JSONp is x-domain ajax; it goes in the src of a <script> element, and it functions as an asycronous callback, because it's a dynamic script taking a query.
My query excludes the ? but it's a query. It does that in case the url in query has its own ? query.
My query takes 4 options.
- Image URL (required)
- callback function name
- 2nd arguments (string or integer) to better organize callback
- arguments AS_ARG || arguments as array AS_ZERO (constants for quirkiness?)
Play around with it as an iframe src that would be a sript src.
(any domain / any image) ^
callback function and no arguments
callback with one arg as arg
callback with 4 args as arg
callback with 4 args as property 0 instead of separate args
tweak this ^ guy &&
see what this v guy does
I wish all the APIs had argument options for the callback. I did some Tumblr JSONp in Greasemonkey using the public key. Handling multiple async callbacks is weird without an intuitive way to know which one it was.