Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upRemove the ids #2
Comments
shama
closed this
in
a7a4683
Mar 5, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
shama commentedMar 2, 2016
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 anidattribute.It shouldn't be necessary though. There might be a way with
morphdomordiffhtmlto 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.