webcomponents / webcomponents/polyfills

[ShadyCSS] How do we clean up?

Open
#15 3 comments 0 reactions 0 assignees View on GitHub
Package: shadycss Severity: Medium Type: Feature wontfix
Dominant language
HTML
Stars
1.2k
Forks
168
PR merge metrics
No merged PRs in 30d

Description

Right now I am doing

```js
componentWillUnmount() {
document.querySelector(`style[scope=${this.styleScopeName}]`).remove()
}
```

inside my class when it unmounts (a React component).

Is this enough? Or will ShadyCSS still contain a reference to the style sheet and if so how do I clean it?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.