Open hrb90 opened 6 years ago
onNodeAdded
should fire regardless unless you're trying to track a child of an element that moved in which case the parent and all children move and only the parent will trigger. Can you provide a demo of the problem you're seeing?
That may be what's happening; I'll try to put together a simple self-contained example at some point this weekend or early next week and get back to you.
Hi,
We're trying to build a micro-framework on top of morphdom, but we're having trouble keeping track of our components' children when a component moves from one part of the DOM to another. If we discard or add nodes things are working fine, but since our elements are keyed, just moving around the DOM doesn't trigger an
onNodeDiscarded
oronNodeAdded
callback. Is there a way we can use theonBeforeElUpdated
oronBeforeElChildrenUpdated
options to simulate anonNodeMoved
handler?Thanks!