Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Content element selectors - loosen up please! #45

Description

@kristianmandrup

As I understand it and from own experience, a content element can only select direct children. This makes sense in most simple scenarios, but as soon as you have a custom element in the mix it falls apart. The custom element acts as a wrapper around the "real" child elements, now in the shadow dom, but then the children are not there for selection and you can't really compose this way with custom elements which should be the whole point?
Am I missing something here!? I can't believe this design constraint.

https://github.com/Polymer/core-selector/blob/master/core-selector.html#L292

IMO, the nodes should be mapped, so that if a node is a custom element, it should add its children to the list of nodes as well (only at the top level, not recursively!). I understand why you have the current limitation, but sometimes (often), the custom elements acts as a wrapper, a structural element container without any (intended) UI influence, just a way to decompose a logical entity.

PS: How do you test if a given node is a custom element? Simply by naming convention? or is there a better way? Thanks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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