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

web-ext run should encourage background.scripts when only background.service_worker is present #3101

Open
Rob--W opened this issue Apr 11, 2024 · 0 comments

Comments

@Rob--W
Copy link
Member

Rob--W commented Apr 11, 2024

MV3 extensions originally developed for Chrome often use the service_worker key. Firefox does not support background.service_worker yet, and the lack of support for that is often a surprise (e.g. #3045).

Firefox 121+ and Chrome 121+ support specifying service_worker and scripts in the background key at once, mentioned at https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/121#changes_for_add-on_developers and documented at https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/background#browser_support

Chrome 121 was released in January 2024, Firefox 121 was released in December 2023. This has been long enough for general recommendations to specify scripts and service_worker to make sense. We should detect when a manifest contains background.service_worker without background.page or background.scripts, and recommend the addition of scripts (with a link to documentation) to improve the developer experience.

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

No branches or pull requests

1 participant