Open
Description
I don't know if this repo is going to standardize Manifest V3 but I think I can post it here.
Currently, in Manifest V3, the background worker is reusing the Service Worker, which is a very bad reuse. It inherits many restrictions of the Service Worker which does not make sense to the Web Extension background worker. Here is a list of examples:
- Issue 1159286: Cannot use importScripts after init in Web Extension manifest v3 background service worker
- Issue 1136582: Can't register service workers in non-root directory as the background context of extensions V3
I propose to add a new Worker type like ServiceWorker, WebExtensionWorker
. Thus we can gain the following benefits:
- Reconsider the difference between ServiceWorker and WebExtension background worker, apply different restrictions on them.
- WebIDL integration, it easy to specify what API should be exposed via
[Expose]
- Tell the developers those things are different, not confused by the name ServiceWorker with a set of special behaviors.