heyday/async-load — pull request #2 by sebs (2013-02-20 14:37:32+00:00)
Title: Use async-load in buster.js with external resources. 

When loading external libraries with async-loader, there seems a error when the loader tries to inject the script code into the header. It tries to inject before the "first_script", which is ok in cases where async-loader is in fact the first script. However, in case of buster.js tests it seems the case that there is nothing in the header (first_script.parentNode). I added a little fix that checks if that node is avail, and if not simply appends the new script to the head by el.appendChild.

Check out the usage at

Test:
https://github.com/sebs/jsTemplate/blob/master/tests/JSTemplate.load.js

Usage:
https://github.com/sebs/jsTemplate/blob/master/JSTemplate.load.js