bitovi / bitovi/react-to-web-component

Unable to Remove Custom Element - NotFoundError on removeChild

Open
#219 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
944
Forks
52
PR merge metrics
No merged PRs in 30d

Description

registered a custom element using `customElements.define('web-test')`. However, when I try to delete the `` element from the HTML, I always get the following error:

```
Uncaught NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
```
Is there an alternative method to remove a custom element that has been registered in HTML without encountering this error?

Contributor guide

No contributing guide indexed for this repository

Research direction

No repository file, test, or entry point is named. Start by reproducing the customElements.define and removeChild scenario described in the issue, then trace which node owns the element and where removal is attempted. Done means the repository-specific cause is identified and the supported removal behavior is documented or covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.