Implementation of script communication that:
* uses script tags for communication, but can detect when a script isn't loaded (this is non-trivial to implement across browsers)
* works across domains as long as you control the domains
* works on IE 6, IE 7, IE 8, FF X, Safari, Chrome and Opera
* small (80 lines of code) with no dependencies
For more info and usage check out:
http://amix.dk/blog/post/19489#ScriptCommunicator-implementing-comet-long-polling-for-all-browse
Made by amix the lucky stiff - amix.dk
Copyright Plurk 2010, released under BSD license
Shouldn't this set an id on the script elements and remove them when the call is complete? Otherwise it will continue inserting script elements if the page gets updates in a loop.