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

Feature: patch return new dom element #119

Closed
hyrious opened this issue Sep 10, 2021 · 1 comment
Closed

Feature: patch return new dom element #119

hyrious opened this issue Sep 10, 2021 · 1 comment
Assignees

Comments

@hyrious
Copy link

hyrious commented Sep 10, 2021

Is your feature request related to a problem? Please describe.

If we patch a vnode to some element with different tag name,
the original element will be removed and be replaced with a new element.
The new element can not be accessed unless we do a `querySelector`.

Describe the solution you'd like

Let `patch()` returns the new element, so that we can keep a reference
to the real dom.

Describe alternatives you've considered

None.

Additional context

No response

@aidenybai
Copy link
Owner

Prototype implementation in #120, feel free to check it out. I'll merge it later if there are no issues. Thanks for the feature request

aidenybai added a commit that referenced this issue Sep 10, 2021
feat(patch): return new DOM node on patch #119
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

2 participants