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

Should it clear all childNodes in between? #4

Closed
luwes opened this issue Jan 22, 2020 · 1 comment
Closed

Should it clear all childNodes in between? #4

luwes opened this issue Jan 22, 2020 · 1 comment

Comments

@luwes
Copy link

luwes commented Jan 22, 2020

Just read your proposal here whatwg/dom#736 👍

This is a good lightweight solution! I'm running into issues with document fragments myself with caching etc. (unrelated to this project)

As I was looking through the code I saw the use of the range to clear the children and maybe some more?

Question: should it clear all nodes in between the first and last child?

Probably unlikely but there could be some extra nodes appended in the mean time that you didn't mean to remove. Maybe it should only look at the stored childNodes?


Not so familiar with .valueOf(). Are there cases when this method is called automatically? Does parent.append(myWireObject); work automatically? this would be neat!

tested https://codesandbox.io/s/sleepy-cannon-ny0bh

@WebReflection
Copy link
Owner

Check uwire too 😉
https://github.com/WebReflection/uwire

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