You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to have a single manifest.json file for Firefox and Chrome. We could do this by migrating Firefox to MV3.
The main issue is how we load our service worker or background script (for Firefox). According to MDN:
Since Chrome 121, Chrome will ignore the background.scripts field for MV3 extensions. Chrome <121 it will refuse to load the extension entirely.
Firefox 121+, ignores background.service_worker and will run the background.scripts normally. Firefox <121 will not run background.scripts if background.service_worker is present.
Safari supports background.service_worker and/or background.scripts, and gives priority to background.service_worker.
We would also still need to add browser_specific_settings for Firefox. Due to that we could keep the background.service_worker key replacement in our build process, to make sure that Firefox <121 is supported.
In terms of code changes according to Mozilla's extension tester, the only change needed would be to remove chrome.runtime.restartAfterDelay from src/constants.ts. I think that's fine since we don't ever use it, and it should probably be removed anyways.
The text was updated successfully, but these errors were encountered:
Oh Mozilla/Google, very nice of you to make everything complicated and hard to support cross browsers!
Seems like Firefox 102ESR is past EOL (9/26/2023), and Firefox 115.2.0ESR released in August 2023 which afaik means that (most) ESR installations should support Mv3.
It would be nice to have a single manifest.json file for Firefox and Chrome. We could do this by migrating Firefox to MV3.
The main issue is how we load our service worker or background script (for Firefox). According to MDN:
background.scripts
field for MV3 extensions. Chrome <121 it will refuse to load the extension entirely.background.service_worker
and will run thebackground.scripts
normally. Firefox <121 will not runbackground.scripts
ifbackground.service_worker
is present.background.service_worker
and/orbackground.scripts
, and gives priority tobackground.service_worker
.We would also still need to add
browser_specific_settings
for Firefox. Due to that we could keep thebackground.service_worker
key replacement in our build process, to make sure that Firefox <121 is supported.In terms of code changes according to Mozilla's extension tester, the only change needed would be to remove
chrome.runtime.restartAfterDelay
from src/constants.ts. I think that's fine since we don't ever use it, and it should probably be removed anyways.The text was updated successfully, but these errors were encountered: