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

Dynamic update <style> is not handled by polyfill #76

Open
katmai7 opened this issue Feb 13, 2023 · 0 comments
Open

Dynamic update <style> is not handled by polyfill #76

katmai7 opened this issue Feb 13, 2023 · 0 comments

Comments

@katmai7
Copy link

katmai7 commented Feb 13, 2023

Hi,
I found out that when <style> is dynamically updated with new css, polyfill doesn't handle it.

Example: https://stackblitz.com/edit/js-pkkkut?file=index.js,style.css,index.html,tsconfig.json

After some research I found that the polyfill should parse and apply polyfill logic again after <style> was updated

I've tried to do naive fix and implement update method for StyleElementController:

updated() {
  this.controller?.abort()
  this.connected();
}

But I'm not sure if it a right place to do it.

What is the proper way to make it handle this case?

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

No branches or pull requests

1 participant