webcomponents / webcomponents/polyfills
[scoped-custom-element-registry] Elements can lose registry when removed from DOM
Open
Focus Area: Standards & Polyfills
Type: Bug
- Dominant language
- HTML
- Stars
- 1.2k
- Forks
- 168
- PR merge metrics
- No merged PRs in 30d
Description
### Description
If a nested element is removed from a shadowRoot using a registry and then `innerHTML` is called on it with html containing a scoped element, the element will not customize.
### Example
[Playground example](https://lit.dev/playground/#gist=135aafcfb56f5145d9b11f6902a77341)
#### Expected behavior
Both elements in the example should customize.
#### Actual behavior
The 2nd scoped element fails to customize.
Contributor guide
Assessment
This issue has not been assessed yet.