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

Remove the ids #2

Closed
shama opened this issue Mar 2, 2016 · 0 comments
Closed

Remove the ids #2

shama opened this issue Mar 2, 2016 · 0 comments

Comments

@shama
Copy link
Member

shama commented Mar 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 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.

@shama shama closed this as completed in a7a4683 Mar 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant