@@ -100,9 +100,11 @@ class Image {
100100and 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
188190You 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
192194event (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 () ` .
209211If you don't, Ember will try to approximate a beginning and end for you.
210212Consider 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,
270272as well as the [Backburner library](https://github.com/ebryn/backburner.js/) that powers the run loop.
0 commit comments