Copyright (c) 2007 by Brian Ecker

Hoopty is an AJAX-like external JavaScript loader with the much more 'sane' security policy requiring only that URL match document.domain.


The common AJAX loader functions XMLHttpRequest and Microsoft.XMLHTTP are too restrictive (IMHO) in their security rules. They require the whole hostname of your external source URL to match (chapter and verse) the hostname of your current page. Hoopty only requires you to match document.domain, which you can set to be as least restrictive as foo.com.


Hoopty is very simple to use (you may have noticed that across all my tools). It consists of a single function:

loadJavaScript(url, callback)


url is the external JavaScript you want to load

callback (optional) is the function you want hoopty to call once the JavaScript has loaded


Hoopty is licensed under the terms of the BSD license.


You can download v1.0 of Hoopty here: hoopty.js