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

Keeping children in destination element #92

Open
roelrz opened this issue Jun 5, 2017 · 1 comment
Open

Keeping children in destination element #92

roelrz opened this issue Jun 5, 2017 · 1 comment

Comments

@roelrz
Copy link

roelrz commented Jun 5, 2017

According to the docs, if a wormhole is used on a route's template it will render it's children in the destination element when the route is rendered and removed when the route is exited.

With that being said, is there any way to keep the children in the destination element even after the route is exited?

My use case is to update the destination element every time a route changes but to keep the route's children in the destination element until the new route's children are ready to be injected via the wormhole

@roelrz roelrz changed the title Keep Children in Destination Element Keeping Children in Destination Element Jun 5, 2017
@roelrz roelrz changed the title Keeping Children in Destination Element Keeping children in destination element Jun 5, 2017
@krisselden
Copy link
Contributor

@roelrz there is no supported way, you can lobby for this feature and/or submit a PR. Currently you can leak the DOM nodes by this._wormholeHeadNode.parentNode.insertBefore(this._wormholeHeadNode, this._wormholeTailNode) in willDestroyElement, or use cloneNode(true) on the node you want to keep.

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

2 participants