Skip to content

Commit 1a27b39

Browse files
committed
catch the last few references to Ember.run
1 parent 404e81c commit 1a27b39

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

guides/release/applications/run-loop.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,11 @@ class Image {
100100
and a template to display its attributes:
101101
102102
```gjs
103+
let profilePhoto = new Image({ width: 250, height: 500 });
104+
103105
<template>
104-
{{this.width}}
105-
{{this.aspectRatio}}
106+
{{profilePhoto.width}}
107+
{{profilePhoto.aspectRatio}}
106108
</template>
107109
```
108110
@@ -187,8 +189,8 @@ which will make you a better Ember developer.
187189
188190
You should begin a run loop when the callback fires.
189191
190-
The `Ember.run` method can be used to create a run loop.
191-
In this example, `Ember.run` is used to handle an online
192+
The `run()` method, imported from `@ember/runloop`, can be used to create a run loop.
193+
In this example, `run()` is used to handle an online
192194
event (browser gains internet access) and run some Ember code.
193195
194196
```javascript
@@ -205,7 +207,7 @@ window.addEventListener('online', () => {
205207
206208
## What happens if I forget to start a run loop in an async handler?
207209
208-
As mentioned above, you should wrap any non-Ember async callbacks in `Ember.run`.
210+
As mentioned above, you should wrap any non-Ember async callbacks in `run()`.
209211
If you don't, Ember will try to approximate a beginning and end for you.
210212
Consider the following callback:
211213
@@ -266,5 +268,5 @@ window.addEventListener('online', () => {
266268
267269
## Where can I find more information?
268270
269-
Check out the [Ember.run](https://api.emberjs.com/ember/release/classes/@ember%2Frunloop) API documentation,
271+
Check out the [@ember/runloop](https://api.emberjs.com/ember/release/classes/@ember%2Frunloop) API documentation,
270272
as well as the [Backburner library](https://github.com/ebryn/backburner.js/) that powers the run loop.

0 commit comments

Comments
 (0)