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

fix: Throw DOMException when calling removeChild with invalid parameter #494

Merged
merged 1 commit into from
Jun 9, 2023

Conversation

karfau
Copy link
Member

@karfau karfau commented Jun 9, 2023

BREAKING CHANGE: Previously it was possible (but not documented) to call Node.removeChild with any node in the tree,
and with certain exceptions, it would work. This is no longer the case: calling Node.removeChild with an argument that is not a direct child of the node that it is called from, will throw a NotFoundError DOMException, as it is described by the specs.

https://dom.spec.whatwg.org/#concept-node-pre-remove
Fixes #135

…meter

BREAKING-CHANGE: Previously it was possible (but not documented) to call `Node.removeChild` with any node in the tree,
and with certain exceptions, it would work. This is no longer the case: calling `Node.removeChild` this way will now throw a NotFoundError DOMException, as it is described by the specs.

https://dom.spec.whatwg.org/#concept-node-pre-remove
Fixes #135
@karfau karfau added this to the 0.9.0 milestone Jun 9, 2023
@karfau karfau merged commit 8a9542d into master Jun 9, 2023
21 checks passed
@karfau karfau deleted the 135/throw-not-found branch June 9, 2023 20:14
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.

Inconsistent Behaviour of node.removeChild()
1 participant