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. https://github.com/mozilla/web-ext/issues/3045).
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.
MV3 extensions originally developed for Chrome often use the
service_worker
key. Firefox does not supportbackground.service_worker
yet, and the lack of support for that is often a surprise (e.g. https://github.com/mozilla/web-ext/issues/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
andservice_worker
to make sense. We should detect when a manifest containsbackground.service_worker
withoutbackground.page
orbackground.scripts
, and recommend the addition ofscripts
(with a link to documentation) to improve the developer experience.