You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 29, 2019. It is now read-only.
Deferring work until after the constructor completes using `setTimeout` or `requestAnimationFrame`.
671
-
672
672
673
673
#### Ready time {#ready-time}
674
674
675
-
The `ready` callback, for one-time initialization, signals the creation of the element's shadow DOM. In the case of class-based elements, you need to call `super.ready()` before accessing the shadow tree.
675
+
The `ready` callback, for one-time initialization, signals the creation of the element's shadow DOM.
676
+
In the case of class-based elements, you need to call `super.ready()` before accessing the shadow
677
+
tree.
676
678
677
-
The major difference between 1.x and 2.0 has to do with the timing of initial light DOM distribution. In the v1 shady DOM polyfill, initial distribution of children into `<slot>` is asynchronous (microtask) to creating the `shadowRoot`, meaning distribution occurs after observers are run and `ready` is called. In the Polymer 1.0 shim, initial distribution occurred before `ready`.
679
+
The major difference between 1.x and 2.0 has to do with the timing of initial light DOM distribution.
680
+
In the v1 shady DOM polyfill, initial distribution of children into `<slot>` is asynchronous
681
+
(microtask) to creating the `shadowRoot`, meaning distribution occurs after observers are run and
682
+
`ready` is called. In the Polymer 1.0 shim, initial distribution occurred before `ready`.
678
683
679
-
To check the initial distribution, use `setTimeout` or `requestAnimationFrame` from `ready`. The callback should fire after initial distribution is complete.
684
+
To check the initial distribution, use `setTimeout` or `requestAnimationFrame` from `ready`. The
685
+
callback should fire after initial distribution is complete.
680
686
681
687
682
688
```
@@ -688,7 +694,8 @@ ready: function() {
688
694
```
689
695
690
696
691
-
You can use a `slotchange` event listener to react to runtime changes to distribution, but the event listener doesn't fire for the *initial* distribution.
697
+
You can use a `slotchange` event listener to react to runtime changes to distribution, but the event
698
+
listener doesn't fire for the *initial* distribution.
692
699
693
700
694
701
```
@@ -700,11 +707,14 @@ ready: function() {
700
707
```
701
708
702
709
703
-
In order to force distribution synchronously, call `ShadyDOM.flush()`. This can be useful for unit tests.
710
+
In order to force distribution synchronously, call `ShadyDOM.flush()`. This can be useful for unit
711
+
tests.
712
+
704
713
705
714
### Remove type-extension elements {#remove-type-extension-elements}
706
715
707
-
Polymer doesn't support type-extension elements (such as `<input is="iron-input">`). For a discussion of this change, see [Type-extension elements](about_20#type-extension)
716
+
Polymer doesn't support type-extension elements (such as `<input is="iron-input">`). For a discussion
717
+
of this change, see [Type-extension elements](about_20#type-extension)
0 commit comments