-
-
Notifications
You must be signed in to change notification settings - Fork 185
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
Maximum call stack size exceeded when appending parent to child #643
Labels
bug
Something isn't working
Comments
btea
added a commit
to btea/happy-dom
that referenced
this issue
Feb 27, 2023
capricorn86
added a commit
to btea/happy-dom
that referenced
this issue
Apr 15, 2023
capricorn86
added a commit
to btea/happy-dom
that referenced
this issue
Apr 18, 2023
capricorn86
added a commit
to btea/happy-dom
that referenced
this issue
Apr 18, 2023
capricorn86
added a commit
to btea/happy-dom
that referenced
this issue
Apr 19, 2023
capricorn86
added a commit
that referenced
this issue
Apr 19, 2023
#643@patch: Append node should not be parent.
Thank you for reporting @sionzee! 🙂 Big thanks to @btea for your contribution! 🌟 You can read more about the release here: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Whenever you try to move the parent to the child node and listen to the mutation observer on that node, you will end up in a recursive call. The child will have a parent node, and the parent node will have the child node in childList.
To Reproduce
Quick reproduction code:
Expected behavior
The parent should be appended to the child, and the child's parent should be set to null or the parent element of the parent. In my code, the parent is temporarily null, and I will append it later to the existing node. It is worth checking what the original DOM is doing in this case and going that way.
Additional context
The error:
I was debugging the code, and it is stuck in the
Node.ts
file on this function:The text was updated successfully, but these errors were encountered: