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

feat(js): add more DOM manipulation methods to the Node class #20

Merged
merged 4 commits into from
Feb 7, 2024

Conversation

shouya
Copy link
Owner

@shouya shouya commented Feb 7, 2024

This pull request adds the following DOM manipulation methods to the Node class.

  • Node.previous_sibling(): returns the previous sibling of the node
  • Node.next_sibling(): returns the next sibling of the node
  • Node.parent(): returns the parent of the node
  • Node.node_type() returns the type of the node (one of "text", "element", "other")
  • Node.destroy(): removes the node from the DOM

Fixes #14.

@shouya shouya merged commit 1d5c771 into master Feb 7, 2024
2 checks passed
@shouya shouya deleted the more-dom-operation branch February 7, 2024 14:12
@shouya shouya added the feature label Feb 20, 2024
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.

Better DOM navigation support
1 participant