jsdefer
jsdefer copied to clipboard
Script loader, using the 'Deferred' pattern for async operations.
Multiple script definitions with same url will choose last definition regardless of name. Example: ``` jQuery: { bare: true, url: aspnetcdn + "/jQuery/jquery-1.7.1.js", urlMin: aspnetcdn + "/jQuery/jquery-1.7.1.min.js", loaded: "!!window.jQuery" },...
When a script is loaded on the page via script tag and then jsdefer tries to include it jsdefer should test for it. jsdefer should provide a boolean expression test...
jsDefer fails when placed on a page with jQuery 1.4 and lower. Version check should be built into jsdefer so it doesn't try to use jQuery methods that aren't there.
When loading jQuery with jsdefer, $ becomes jQuery and loses all jsDefer methods/properties.
Add support for including css links in the loader... Just for convenience of using one thing to include everything, and it is only a few more lines of code.
This may seem like a helper, but the :// search on line 261 should just be // because you then don't have to worry about whether it's ssl or not...
an example : i have library file containing ``` window.$deferRun( function( $, options) { function A_processed() { // ... } function B_processed() { // ... } // here is the...