Skip to content

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

Description

@morethanreal

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.

Activity

  1. changed the title [-]`<content select=".class">` and `hostAttributes` don't work together[/-] [+][0.8] `<content select=".class">` and `hostAttributes` don't work together[/+] on Apr 21, 2015
  2. self-assigned this
    on Apr 21, 2015
  3. sorvell commented on Apr 27, 2015

    @sorvell
    Contributor

    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.

  4. sorvell commented on Apr 29, 2015

    @sorvell
    Contributor

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

  5. sorvell commented on May 5, 2015

    @sorvell
    Contributor

    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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions