JIT - Just In Time Javascript Loader

This is a work-in-progress and that's why it's in the "sandbox"
This version should load external scripts that referenced in the @src attribute of <script> tags that are loaded via Ajax.

Test JIT Loader

Cache Manager
Author: Sean Gilligan
Version: 1.0
See also
- Getting Started
- Frequently Asked Questions
- iUI code documentation
- Advanced styling & themes
Get Involved
Like in most open-source projects, the more we are, the meyer it is! HTML/CSS/JS, documentation, design, translation, ...
Don't be shy

beforeInsert finds <script> elements and adds them to loadingScripts[];
afterInsertEnd asynchronously loads scripts one at a time - the onload callback for script n starts the load of script n+1

Caveats:
1) Hardly any testing
2) Assumes type="text/javascript"
3) Code in script.innerText is run each time that fragment is inserted/replaced

Todo:
1) Support for loading CSS stylesheets (or should that be a separate extension

Based on work submitted by C.W. Zachary for Issue #128 and Wayne Pan for Issue #102