ember-tools icon indicating copy to clipboard operation
ember-tools copied to clipboard

Can you offer some guidance on where to put global patches?

Open lastobelus opened this issue 11 years ago • 0 comments

Where should I put global patches? For example, I would like this patch to apply to all views in my application:

Ember.View.reopen({
  didInsertElement : function(){
    this._super();
    Ember.run.scheduleOnce('afterRender', this, this.afterRenderEvent);
  },
  afterRenderEvent : function(){
    // implement this hook in your own subclasses and run your jQuery logic there
  }
});

lastobelus avatar Sep 16 '13 22:09 lastobelus