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
When a parent renders, the context to a child element is lost. So when that child element needs to .update(), it must re-find itself in the DOM. This is why we currently require an id attribute.
It shouldn't be necessary though. There might be a way with morphdom or diffhtml to know when a child we previously created has been changed then reconnect that element on .update(). Or use another method to discover when a child has lost it's way that doesn't involve attributes and DOM lookups.
At the very least, we can detect whether or not a child requires a lookup if (element.parentNode == null) before falling to the current system.
The text was updated successfully, but these errors were encountered:
When a parent renders, the context to a child element is lost. So when that child element needs to
.update()
, it must re-find itself in the DOM. This is why we currently require anid
attribute.It shouldn't be necessary though. There might be a way with
morphdom
ordiffhtml
to know when a child we previously created has been changed then reconnect that element on.update()
. Or use another method to discover when a child has lost it's way that doesn't involve attributes and DOM lookups.At the very least, we can detect whether or not a child requires a lookup
if (element.parentNode == null)
before falling to the current system.The text was updated successfully, but these errors were encountered: