-
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
[0.8] Nested insertion points lose elements after distributeContent #1480
Comments
Yes, if I read the example correctly, this is intended behavior. Shady DOM and Shadow DOM share the same design. The distribution of nodes changes rendering but not dom structure. In this case the To see nodes distributed to an insertion point, Polymer.dom provides Fwiw, you can also see to which insertion point a given element has been distributed (generally this is not needed too much) using |
Thanks Steve, this was exactly what I was looking for. I somehow overlooked this from the primer. |
The reason I bumped on the above question is for the following scenario where somehow the insertion point loses elements after distributeContent: http://jsbin.com/jejami/1/edit?html,output Could this be related to this issue? #1394 |
Definitely looks like a bug or 2 here. I'll investigate. Thanks for the detailed test case. |
Thanks, I also updated the sample case to reflect the latest changes. |
Currently, In addition, we're planning on adding node mutation api (probably setAttribute and classList) to Polymer.dom so you should only rarely need to provoke distribution manually. |
Actually, you are right that the precise problem you noted is related to #1394. What I said is also true... fixes for both are on the way. |
Awesome, thanks! Just to add some context to all of the above, this is the mock-up code of the real-world scenario we've build: http://jsbin.com/tireqatehe/1/edit?html Adding the Polymer.dom API for adding/removing the attribute in this case and distributing immediately, will indeed eliminate the need to call distributeContent ourselves. Like you said. |
Fixed via d5070c5 |
In the following scenario,
Polymer.dom(this).children
returns the<content>
element.Is this intended? If so, is going through the
_distributedNodes
property the correct way to get the real children or is there another api call I should be using?http://jsbin.com/bixero/3/edit?html,output
The text was updated successfully, but these errors were encountered: