Skip to content

chore: use Element#remove instead of Node#removeChild - #347

Open
mathiasbynens wants to merge 1 commit into
frappe:v2-betafrom
mathiasbynens:v2-beta-remove
Open

mathiasbynens wants to merge 1 commit into
frappe:v2-betafrom
mathiasbynens:v2-beta-remove

Conversation

@mathiasbynens

Copy link
Copy Markdown

This simplifies the code.

@lbesecker195 lbesecker195 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Element#remove() is equivalent to parentNode.removeChild(el) for attached nodes and is a no-op rather than a throw for detached ones. The project declares no browserslist or IE support, so nothing is lost. LGTM.

This branch has not been deployed

No deployments
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.

2 participants