nanomorph mutates the new DOM node tree
reminyborg opened this issue · comments
Remi Nyborg commented
When using appendChild to add children from the new tree to the original it removes them from the original.
Should we add a warning about this in the docs?
ref morphdom writes:
NOTE: This module will modify both the original and target DOM node tree during the transformation. It is assumed that the target DOM node tree will be discarded after the original DOM node tree is morphed.
Yosh commented
Ah yeah that makes sense; think adding a note to the readme would be great ✨
…On Thu, Jan 19, 2017, 22:38 Remi Nyborg ***@***.***> wrote:
When using appendChild
<https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild> to
add children from the new tree to the original it removes them from the
original.
Should we add a warning about this in the docs?
ref morphdom writes:
NOTE: This module will modify both the original and target DOM node tree during the transformation. It is assumed that the target DOM node tree will be discarded after the original DOM node tree is morphed.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#33>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACWleqpphViTBepCQw5Wve-rHxt1DItLks5rT9flgaJpZM4Looxb>
.
Yosh commented
Fixed!