-
Notifications
You must be signed in to change notification settings - Fork 66
Web Components behaviour in content scripts #210
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
Comments
I support disabling |
I think this is the relevant Chromium issue: https://bugs.chromium.org/p/chromium/issues/detail?id=390807 |
This disabling is only for isolated worlds, correct? |
As of 2023-12-16, in Google Chrome 119 on Windows creation of custom elements from inside content scripts is supported (at least with manifest V3). Accessing Update: never mind, apparently, |
|
Been digging through Firefox's code trying to fix Web Components in extension content scripts (https://bugzilla.mozilla.org/show_bug.cgi?id=1492002).
I've found the core problem, it's specific for Firefox implementation, but now I'm not sure what "correct" solution should look like.
Right now Firefox's policy regarding normal JS objects looks like:
It seems reasonable to extend this policy to Web Components:
but it may be just my narrow point of view.
Also right now window.customElements slightly breaks isolation between scripts (not sure if this is Firefox specific) since it is shared between contexts: if component was defined in page script, content script can't use the same name and vice versa.
Maybe "correct" solution would be disabling
customElements
in content scripts altogether?The text was updated successfully, but these errors were encountered: