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

world in content_scripts declaration #485

Open
hanguokai opened this issue Nov 9, 2023 · 0 comments
Open

world in content_scripts declaration #485

hanguokai opened this issue Nov 9, 2023 · 0 comments
Labels
implemented: chrome Implemented in Chrome supportive: firefox Supportive from Firefox supportive: safari Supportive from Safari

Comments

@hanguokai
Copy link
Member

Since Chrome 111, Chrome supports a new key world in content_scripts in manifest, which value is "ISOLATED"(default) or "MAIN". Thus developers can declare content scripts to run in the main world directly.

In the meeting Nov 9, 2023, we also discussed this issue when we were discussing #482 . At the moment, Firefox and Safari support (or will support) world in browser.scripting API, and they are supportive of the world key in manifest.

@hanguokai hanguokai added implemented: chrome Implemented in Chrome supportive: safari Supportive from Safari supportive: firefox Supportive from Firefox and removed needs-triage labels Nov 9, 2023
birtles added a commit to birchill/10ten-ja-reader that referenced this issue Jan 2, 2024
Fixes #1529.

MV3 only allows the values "self", "wasm-unsafe-eval", and
"wasm-unsafe-eval" for an extension's `script-src` CSP setting.

As a result, we can no longer use inline script to update the main world
`window` global in order to enable Google Docs' annotated canvas mode.

Instead we use the new `world: 'MAIN'` setting and in Firefox, which
doesn't yet support that setting, we use Firefox's X-ray vision object
unwrapping.

Safari doesn't support Google Docs' annotated canvas due to:

  https://bugs.webkit.org/show_bug.cgi?id=232781

However, Safari have indicated support for implementing `world: 'MAIN'`
in:

  w3c/webextensions#485
birtles added a commit to birchill/10ten-ja-reader that referenced this issue Jan 2, 2024
Fixes #1529.

MV3 only allows the values "self", "wasm-unsafe-eval", and
"wasm-unsafe-eval" for an extension's `script-src` CSP setting.

As a result, we can no longer use inline script to update the main world
`window` global in order to enable Google Docs' annotated canvas mode.

Instead we use the new `world: 'MAIN'` setting and in Firefox, which
doesn't yet support that setting, we use Firefox's X-ray vision object
unwrapping.

Safari doesn't support Google Docs' annotated canvas due to:

  https://bugs.webkit.org/show_bug.cgi?id=232781

However, Safari have indicated support for implementing `world: 'MAIN'`
in:

  w3c/webextensions#485
bkzhn pushed a commit to bkzhn/10ten-ja-reader that referenced this issue Jan 11, 2024
Fixes birchill#1529.

MV3 only allows the values "self", "wasm-unsafe-eval", and
"wasm-unsafe-eval" for an extension's `script-src` CSP setting.

As a result, we can no longer use inline script to update the main world
`window` global in order to enable Google Docs' annotated canvas mode.

Instead we use the new `world: 'MAIN'` setting and in Firefox, which
doesn't yet support that setting, we use Firefox's X-ray vision object
unwrapping.

Safari doesn't support Google Docs' annotated canvas due to:

  https://bugs.webkit.org/show_bug.cgi?id=232781

However, Safari have indicated support for implementing `world: 'MAIN'`
in:

  w3c/webextensions#485
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
implemented: chrome Implemented in Chrome supportive: firefox Supportive from Firefox supportive: safari Supportive from Safari
Projects
None yet
Development

No branches or pull requests

1 participant