Skip to content

Commit

Permalink
mention the loader hook in the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ekashida committed Mar 17, 2014
1 parent f920e67 commit f395b31
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/loader/js/loader.js
Expand Up @@ -76,6 +76,19 @@ Y.Env.meta = META;
});
var out = loader.resolve(true);
* If the Loader needs to be patched before it is used for the first time, it
* should be done through the `doBeforeLoader` hook. Simply make the patch
* available via configuration before YUI is loaded:
YUI_config = YUI_config || {};
YUI_config.doBeforeLoader = function (config) {
var resolve = this.context.Loader.prototype.resolve;
this.context.Loader.prototype.resolve = function () {
// do something here
return resolve.apply(this, arguments);
};
};
* @constructor
* @class Loader
* @param {Object} config an optional set of configuration options.
Expand Down

0 comments on commit f395b31

Please sign in to comment.