Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.

Latest commit

 

History

History
19 lines (15 loc) · 519 Bytes

schedule_once.md

File metadata and controls

19 lines (15 loc) · 519 Bytes

Ember.run.scheduleOnce

This fork backports Ember.run.scheduleOnce and the afterRender queue from Ember 1.

Usage:

var MyView = Ember.View.extend({
  didInsertElement: function() {
    Ember.run.scheduleOnce('afterRender', this, function(){
      // will run after all views that are currently being
      // rendered, including this one, are done rendering.
    });
  }
});

This is preferred over Em.run.once or even Em.run.next, if your intent is to manipulate the DOM representation of a view.