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

Feature: Add distributed children changed callback/event #1773

Closed
kevinpschaaf opened this issue Jun 7, 2015 · 8 comments
Closed

Feature: Add distributed children changed callback/event #1773

kevinpschaaf opened this issue Jun 7, 2015 · 8 comments
Assignees

Comments

@kevinpschaaf
Copy link
Member

Due to timing differences resulting from the inability to polyfill the exact timing of parent/child lifecycle callbacks for native custom elements, Chrome and polyfilled browsers behave differently in attached timing between parent/children, leading users to search for a solution to know when parents can interact with their children.

In 0.5, we had a fig-leaf solution called domReady, which was called async after the element became attached, which avoided seeing the timing difference between parent/child attachment. We have avoided adding this back in 1.0 because it was incomplete: if an element needs to inspect its children, it shouldn't only do that once at startup, but any time its children change, since this could happen when the user appendChild's to the element directly (or via distribution).

The proper solution will be to provide a normalized callback when any light/distributed children change that users will be able to use in either case.

@arthurevans
Copy link

/sub

2 similar comments
@jklein24
Copy link
Contributor

jklein24 commented Jun 8, 2015

/sub

@morethanreal
Copy link
Contributor

/sub

@ebidel
Copy link
Contributor

ebidel commented Jun 15, 2015

/sub

@sorvell
Copy link
Contributor

sorvell commented Aug 13, 2015

Work on this issue is being done in: https://github.com/Polymer/polymer/tree/effective-children

@notwaldorf
Copy link
Contributor

/sub 👀

@jab
Copy link

jab commented Oct 19, 2015

Hi Team Polymer,
Interested in following progress on this (and contributing if I can) but the https://github.com/Polymer/polymer/tree/effective-children branch linked to above is giving 404.
Also, is PolymerElements/iron-form#61 (which this is blocking) important enough to promote this from p1 to p0? On the grounds that the disable-submit-button-until-form-is-valid pattern is so common.
Thanks!

@sorvell
Copy link
Contributor

sorvell commented Nov 30, 2015

Merged this awhile so closing. See https://www.polymer-project.org/1.0/docs/devguide/local-dom.html#observe-nodes for documentation.

@sorvell sorvell closed this as completed Nov 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants