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

Error in _injectChildStyle when shadowRoot is disabled in CustomElementApi #12630

Open
seperez-ncl opened this issue Dec 30, 2024 · 1 comment

Comments

@seperez-ncl
Copy link

Vue version

3.5.13

Link to minimal reproduction

N/A

Steps to reproduce

1- Create a Vue component with child component inside with scoped styles. using the Custom Element API.
2- Disable Shadow DOM.
3- Open the browser console and observe the shadowRoot error when _injectChildStyle runs.

What is expected?

When the shadowRoot option is disabled (or otherwise omitted) and child components have their own styles, Vue should inject (or refrain from injecting) those styles without throwing console errors.

What is actually happening?

Currently, when shadowRoot is disabled, the _injectChildStyle function attempts to apply child styles to a Shadow DOM. Since shadowRoot does not exist, a console error occurs indicating it cannot access shadowRoot or its methods.

System Info

No response

Any additional comments?

No response

@edison1105
Copy link
Member

edison1105 commented Dec 31, 2024

Please follow the issue requirement and provide a minimal runnable reproduction
cannot reproduce see Playground

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants