File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ @module @ember /renderer
3
+ @public
4
+ */
5
+
6
+ /**
7
+ * @class Renderer
8
+ * @public
9
+ */
10
+
11
+ /**
12
+ Returns a promise which will resolve when rendering has completed. In
13
+ this context, rendering is completed when all auto-tracked state that is
14
+ consumed in the template (including any tracked state in models, services,
15
+ etc. that are then used in a template) has been updated in the DOM.
16
+
17
+ For example, in a test you might want to update some tracked state and
18
+ then run some assertions after rendering has completed. You _could_ use
19
+ `await settled()` in that location, but in some contexts you don't want to
20
+ wait for full settledness (which includes test waiters, pending AJAX/fetch,
21
+ run loops, etc) but instead only want to know when that updated value has
22
+ been rendered in the DOM. **THAT** is what `await rerender()` is _perfect_
23
+ for.
24
+ @method renderSettled
25
+ @returns {Promise<void> } a promise which fulfills when rendering has completed
26
+ @public
27
+ */
28
+
29
+ export { renderSettled } from '@ember/-internals/glimmer' ;
Original file line number Diff line number Diff line change @@ -420,6 +420,7 @@ module.exports = {
420
420
'removeObjects' ,
421
421
'removeObserver' ,
422
422
'removeTestHelpers' ,
423
+ 'renderSettled' ,
423
424
'reopen' ,
424
425
'reopenClass' ,
425
426
'replace' ,
You can’t perform that action at this time.
0 commit comments