Skip to content

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

Merged
karfau merged 1 commit into
masterfrom
135/throw-not-found
Jun 9, 2023
Merged

fix: Throw DOMException when calling removeChild with invalid parameter#494
karfau merged 1 commit into
masterfrom
135/throw-not-found

Conversation

@karfau

@karfau karfau commented Jun 9, 2023

Copy link
Copy Markdown
Member

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 force-pushed the 135/throw-not-found branch from 479a9b9 to 258d194 Compare June 9, 2023 20:07
@karfau karfau added this to the 0.9.0 milestone Jun 9, 2023
@karfau karfau merged commit 8a9542d into master Jun 9, 2023
@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