Closed cammytown closed 2 years ago
Thank you for the report! I agree with you that we should conform to MDN spec. This is definitely something that should be implemented.
If you or anyone are interested in doing a PR, it is welcomed! Otherwise, I will look into it when I find some time.
Thanks for this library; it's extremely useful.
appendChild
does not currently behave as it does in browsers; moving to its new parent by first removing itself from its current one.As per https://www.w3.org/TR/DOM-Level-2-Core/core.html
It may be better to have the functionality of
appendChild
in this library reflect the W3 specification.For now, I'm simply calling
.remove
on the element before calling.appendChild
. Presumably patching this into the actual library would be essentially the same concept.I suppose this could be a breaking change for some implementations that rely on the duplication.
Cheers.