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

fixKeyframes throws error when using shadow DOM + legacy browsers #171

Closed
mijelin opened this issue Jun 10, 2022 · 1 comment
Closed

fixKeyframes throws error when using shadow DOM + legacy browsers #171

mijelin opened this issue Jun 10, 2022 · 1 comment

Comments

@mijelin
Copy link

mijelin commented Jun 10, 2022

When using web components / shadow DOM:

cssVars({
  rootElement: document.querySelector('custom-element').shadowRoot,
  onlyLegacy: false,
  variables: { /* ... */ }
});

// or
// cssVars({
//   rootElement: document.querySelector('custom-element'),
//   shadowDOM: true,
//   onlyLegacy: false,
//   variables: { /* ... */ }
// });

and the parsed styles contain keyframes rules, an error is thrown when performing the DOM update:

e.getElementsByTagName is not a function

@ https://github.com/jhildenbiddle/css-vars-ponyfill/blob/v2.4.7/src/index.js#L837

Reproduction: https://stackblitz.com/edit/typescript-xeedun?file=index.ts

@mijelin mijelin changed the title fixKeyframes throws error when using shadow DOM fixKeyframes throws error when using shadow DOM + legacy browsers Jun 10, 2022
@jhildenbiddle
Copy link
Owner

Fixed in 2.4.8

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

2 participants