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

Fixed Node::append_child, Node::append_children, Node::prepend_child, and Node::prepend_children #27

Merged
merged 5 commits into from
Nov 5, 2024

Conversation

niklak
Copy link
Owner

@niklak niklak commented Nov 5, 2024

  • Fixed Node::append_child, Node::append_children, Node::prepend_child, and Node::prepend_children: these methods now internally remove the child/children from their previous parent node before attachment.

It was very easy to forget to call child.remove_from_parent().

Copy link

codecov bot commented Nov 5, 2024

Codecov Report

Attention: Patch coverage is 95.65217% with 2 lines in your changes missing coverage. Please review.

Project coverage is 83.20%. Comparing base (45b44fc) to head (ab576e4).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
src/dom_tree.rs 94.44% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #27      +/-   ##
==========================================
+ Coverage   83.13%   83.20%   +0.07%     
==========================================
  Files          13       13              
  Lines        1986     1989       +3     
==========================================
+ Hits         1651     1655       +4     
+ Misses        335      334       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@niklak niklak changed the title Fix/node append child Fixed Node::append_child, Node::append_children, Node::prepend_child, and Node::prepend_children Nov 5, 2024
@niklak niklak merged commit c507dd8 into main Nov 5, 2024
8 checks passed
@niklak niklak deleted the fix/node-append-child branch November 5, 2024 18:32
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

Successfully merging this pull request may close these issues.

1 participant