Created
March 1, 2014 15:10
-
-
Save teddyzeenny/9291219 to your computer and use it in GitHub Desktop.
Event for load hooks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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