-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Custom elements cannot be used inside content scripts on extensions (v4 to v5 regression) #14739
Comments
If that's the problem you can just create a custom element passing Here's an example https://svelte.dev/playground/b508172a42f7499ca4d1b41693ae5bf9?version=5.14.2 |
I'm not registering any elements using svelte. I'm trying to use a custom element already registered by the site I'm hooking into using manifest's content script. |
The dependency on the |
Describe the bug
After upgrading to svelte 5, I cannot use anymore custom elements that was already mounted on the page inside content scripts on my chrome extension.
The bug apparently it's because svelte 5 now rely on window.customElements, which is not available inside content scripts.
I think it is just a matter of adding a check if
typeof window.customElements
is undefined or not, to fallback to the previous solution that worked on v4.Reproduction
<foo-bar>
<foo-bar>
Logs
System Info
Severity
blocking an upgrade
The text was updated successfully, but these errors were encountered: