-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Comments
/sub |
2 similar comments
/sub |
/sub |
/sub |
Work on this issue is being done in: https://github.com/Polymer/polymer/tree/effective-children |
/sub 👀 |
Hi Team Polymer, |
Merged this awhile so closing. See https://www.polymer-project.org/1.0/docs/devguide/local-dom.html#observe-nodes for documentation. |
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.
The text was updated successfully, but these errors were encountered: