forked from emberjs/ember.js
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request emberjs#20053 from cafreeman/cfreeman/expose-rende…
…r-settled
- Loading branch information
1 parent
4eec765
commit 17f25e6
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
@module @ember/renderer | ||
@public | ||
*/ | ||
|
||
/** | ||
* @class Renderer | ||
* @public | ||
*/ | ||
|
||
/** | ||
Returns a promise which will resolve when rendering has completed. In | ||
this context, rendering is completed when all auto-tracked state that is | ||
consumed in the template (including any tracked state in models, services, | ||
etc. that are then used in a template) has been updated in the DOM. | ||
For example, in a test you might want to update some tracked state and | ||
then run some assertions after rendering has completed. You _could_ use | ||
`await settled()` in that location, but in some contexts you don't want to | ||
wait for full settledness (which includes test waiters, pending AJAX/fetch, | ||
run loops, etc) but instead only want to know when that updated value has | ||
been rendered in the DOM. **THAT** is what `await rerender()` is _perfect_ | ||
for. | ||
@method renderSettled | ||
@returns {Promise<void>} a promise which fulfills when rendering has completed | ||
@public | ||
*/ | ||
|
||
export { renderSettled } from '@ember/-internals/glimmer'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters