Closed Tims101 closed 2 years ago
We also found the problem with style
tag inside of svg
tag. On IE11 innerHTML
property is not available for that style element.
When is trying to be used innerHTML
(see addGlobalStyle()
function), we got undefined instead of String
type. So for example clean()
function thrown the error as the function expects a string value:
function clean(cssText) {
return cssText.replace(RX.comments, '').replace(RX.port, '');
}
This issue affected all versions of Stencil.
Hi @Tims101, I opened a PR which should fix this problem: https://github.com/ionic-team/stencil/pull/1892
Stencil version:
also happens for
@stencil/core@0.18.1
I'm submitting a:
[x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/
Current behavior:
If a page in IE11 contains SVG with Style tag inside, web components are not being hydrated.
Expected behavior:
If a page in IE11 contains SVG with Style tag inside, web components should work fine.
Steps to reproduce:
Add SVG with style attribute to a page with a web component and open it in IE11.
Other information:
In CSS-Shim polyfill all style tags on a page are selected and processed to replace with variables and etc. In IE11 innerHTML for style tag in SVG is always undefined, so CSS Shim is failing.