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
This example should distribute nodes with .foo first.
In the first example, the class is set on the distributed node with hostAttributes. In the second example it's set with an inline class attribute. Only the second example distributes properly.
The text was updated successfully, but these errors were encountered:
morethanreal
changed the title
<content select=".class"> and hostAttributes don't work together
[0.8] <content select=".class"> and hostAttributes don't work together
Apr 21, 2015
Distribution based on element mutations is not automatic under ShadyDOM. Distribution is synchronous to element upgrade. In the example my-element upgrades and distributes and then other-element upgrades. In the example, distribute must be called on my-element.
We've investigating ways to improve this. Distribution could be made asynchronous to upgrade, but the dynamic case still requires kicking. A mutation observer could be used to monitor my-element, but there are performance concerns with this approach.
In the example provided, if you import other-element before my-element, you can avoid the issue. It's not always feasible to import children before parents, however, so we'll still fix the issue.
https://gist.github.com/morethanreal/da583f571d9931d03f99
This example should distribute nodes with
.foo
first.In the first example, the class is set on the distributed node with
hostAttributes
. In the second example it's set with an inlineclass
attribute. Only the second example distributes properly.The text was updated successfully, but these errors were encountered: