Skip to content

Commit

Permalink
[DOC] fix docs for schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
bekzod committed Jun 13, 2019
1 parent 319e3ce commit 49b6569
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/@ember/runloop/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,15 +307,20 @@ export function end() {
```javascript
import { schedule } from '@ember/runloop';
schedule('afterRender', this, function() {
// this will be executed in the 'afterRender' queue
console.log('scheduled on afterRender queue');
});
schedule('actions', this, function() {
// this will be executed in the 'actions' queue, after bindings have synced.
// this will be executed in the 'actions' queue
console.log('scheduled on actions queue');
});
// Note the functions will be run in order based on the run queues order.
// Output would be:
// scheduled on sync queue
// scheduled on actions queue
// scheduled on afterRender queue
```
@method schedule
Expand Down

0 comments on commit 49b6569

Please sign in to comment.