Last active
August 29, 2015 13:55
-
-
Save knu2xs/8697409 to your computer and use it in GitHub Desktop.
add afterRender event hook to ember views primitive
This file contains 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
// create after render view event hook to detect when view is finished loading | |
// http://mavilein.github.io/javascript/2013/08/01/Ember-JS-After-Render-Event/ | |
// https://github.com/emberjs/ember.js/commit/512327c0128f53d4a0d6828ab38f27c6ccf686ec | |
Ember.View.reopen({ | |
didInsertElement: function () { | |
this._super(); | |
Ember.run.scheduleOnce('afterRender', this, this.afterRenderEvent); | |
}, | |
afterRenderEvent: function () {} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment