Smallest JSONp Implementation

Apr0611Apr 06, 11

Here's a tiny chunk of JavaScript I wrote while experimenting with writing an insanely small web chat client. I think this might be the worlds smallest JSONp implementation that doesn't suck.

/** Pico JSONp: */
function jsonp(u,cb){var a=jsonp._c=(jsonp._c||0)+1,b='picojsonp_'+a,c=document,d=c.body,s=c.createElement('script');window[b]=function()

/** Example usage: */
jsonp('{callback}', function(response) {

About Jason Miller:

I am a JavaScript developer from Waterloo, Ontario, Canada. When I am not typing green code onto a black screen, you might find me at the nearest coffee pub checking out the brew. I run a internet firm called developIT and maintain blogs and web apps when I can.
its cool bro...
Leave a Comment

Post Comment