Skip to content

Commit

Permalink
[DOC] fix docs for schedule
Browse files Browse the repository at this point in the history
(cherry picked from commit 49b6569)
  • Loading branch information
bekzod authored and rwjblue committed Jun 17, 2019
1 parent 3c5535e commit 487721e
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 487721e

Please sign in to comment.