With Mozilla and Google/Chromium (and Apples) latest agreement to allow a background-script to be defined as both a “event page” and a “service worker” in one and same manifest file, and browser picking only one way of running the script (preferable as service worker if/when supported), I have managed to create a “single-file” crossbrowser compatible MV3 version of my xIFr webextension (an exif-reader) supporting both Firefox 121+ and Chromium 121+ browsers.
It seems mostly to work as well as my current MV2 version of the extension, but besides the current confusing handling of host-permissions (at least for Firefox users), I have noticed that accessing images from file:/// urls are not supported in the MV3 version of my extension. Neither MV2 or MV3 version is able to display the images in my extension popups, which is probably a security feature. But in the MV2-version, I can still read and parse metadata of the image in my contentscript. Any way I can do the same when using MV3? An extra permission maybe?
My extension(s) is able to fetch image from both content and background scripts, so it could be either way.
Both MV2 and MV3 extensions, have the “<all_urls>” host permission. I have also tried adding the “activeTab” permission, but to no effect.
Current documentation I have found is lacking, unclear and confusing I think. Probably partly because it is a mix of MV2 and MV3 relevant information.
It’s a nice feature currently having xIFr (MV2-version) able to display metadata also in images which browser has opened from the local filesystem. Would love to keep that feature in a future MV3-version if I can!?
PS. The new more flexible browser support I’m talking about: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/background#browser_support