Skip to content

Instantly share code, notes, and snippets.

@teddyzeenny
Created March 1, 2014 15:10
Show Gist options
  • Select an option

  • Save teddyzeenny/9291219 to your computer and use it in GitHub Desktop.

Select an option

Save teddyzeenny/9291219 to your computer and use it in GitHub Desktop.
Event for load hooks
Ember.runLoadHooks = function(name, object) {
loaded[name] = object;
var event = new Event(name);
window.dispatchEvent(event);
if (loadHooks[name]) {
forEach.call(loadHooks[name], function(callback) {
callback(object);
});
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment