You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a situation where I need to move a div to another parent in the DOM.
Polymer.dom(newparent).appendChild(div);
This div contains a imported-template element. And when the div is detached and later attached back to the dom. The imported-template reloads the content by calling _importHTMLImport.
Is there some way that the re-loading of the content could be avoided?
I guess an analogy, would be the script tag. Moving a script tag does not re-evaluate the script.
Cheers!
The text was updated successfully, but these errors were encountered:
@warpech we need to decide whether it's a bug/feature/feature that we would liek to change.
I would say it's desired behavior, as it is a convenient way to remove whatever was stamped from it. Detaching imported-template removes also all the stamped nodes. So the analogy is Polymer's dom-bind.
Why would you need to move this element? maybe just to make it easier and cleaner you can just distribute it within Shadow DOM?
The only solution that may somehow fit your need, and our idea of detaching, is that once re-attached imported-template would re-attach its stampedNodes as well, but it may require some time to implement.
Hi!
I have a situation where I need to move a
div
to another parent in the DOM.This
div
contains aimported-template
element. And when thediv
is detached and later attached back to the dom. The imported-template reloads the content by calling_importHTMLImport
.Is there some way that the re-loading of the content could be avoided?
I guess an analogy, would be the script tag. Moving a script tag does not re-evaluate the script.
Cheers!
The text was updated successfully, but these errors were encountered: