Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.8] <content select=".class"> and hostAttributes don't work together #1431

Closed
morethanreal opened this issue Apr 21, 2015 · 3 comments · Fixed by #1580
Closed

[0.8] <content select=".class"> and hostAttributes don't work together #1431

morethanreal opened this issue Apr 21, 2015 · 3 comments · Fixed by #1580
Assignees

Comments

@morethanreal
Copy link
Contributor

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 inline class attribute. Only the second example distributes properly.

@morethanreal 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
@sorvell sorvell self-assigned this Apr 21, 2015
@sorvell
Copy link
Contributor

sorvell commented Apr 27, 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.

@sorvell
Copy link
Contributor

sorvell commented Apr 29, 2015

We think we've found a reasonable way to address this and a fix should be coming soon.

@sorvell
Copy link
Contributor

sorvell commented May 5, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants