-
-
Notifications
You must be signed in to change notification settings - Fork 834
bug: adoptedStyleSheets's mutable before chrome 99 #6326
Copy link
Copy link
Closed
ionic-team/ionic-framework
#30524Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Stencil Version
4.33.0
Current Behavior
App will crash when running on chrome < 99.
https://github.com/stenciljs/core/src/utils/shadow-root.ts
if (globalStyleSheet) shadowRoot.adoptedStyleSheets.push(globalStyleSheet);https://github.com/stenciljs/core/src/runtime/styles.ts
styleContainerNode.adoptedStyleSheets.push(style);Reffer:
1, https://blog.chromium.org/2022/02/chrome-99-css-cascade-layers-new-picker.html#:~:text=document.adoptedStyleSheets%20is%20Now%20Mutable
2. https://chromestatus.com/feature/5638996492288000
Expected Behavior
Not crash when using chrome < 99
System Info
TypeError: Cannot add property 0, object is not extensible
at Array.push (<anonymous>)
at HTMLElement.createShadowRoot (:8100/node_modules/.vite/deps/chunk-HEIOVAU6.js?v=d73e29c9:528)
at HTMLElement.__attachShadow (:8100/node_modules/.vite/deps/chunk-HEIOVAU6.js?v=d73e29c9:3706)Steps to Reproduce
Using Chrome < 99, it will reproduce
Code Reproduction URL
No
Additional Information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels