-
Notifications
You must be signed in to change notification settings - Fork 56
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
[Manifest V3] WebExtensionWorker instead of Service Worker #11
Comments
I kind of agree with this but the biggest problem we face with MV3 is the fact the ServiceWorker can shut down at any time, and will shut down after 5mins even if it's still active at that moment. This is clearly bearable for "light-weight" extensions, but for "heavy-weight" ones performing crypto, sync and things like that, it's a terrible design choice to switch from a persistent background to a volatile Service Worker... |
As I said in the top thread, those limitations (like killed in 5 minutes / inactive) are the limitation of ServiceWorker. If we choose the new mental model, that limitation is not a necessary part of WebExtensionWorker. |
Absolutely. |
IMO discussing the background execution environment for browser extensions is well within this group's charter. That said, I'm compelled to clarify that this group is not trying to "standardize Manifest V3" or otherwise standardize the browser extension platform. Rather, we are attempting to identify and specify a common core of browser extensions capabilities and APIs. The distinction is subtle, but important (primarily for legal reasons?). I'd encourage anyone interested in digging more into this distinction to read through the W3C's community & business group FAQ. |
What does this group think are good next steps for "identifying and specifying a common core" here? It's not clear to me that simply deferring to the most conservative API surface is a good strategy when there seems to be significant contention over the limitations relative to the previous API surface. I like @Jack-Works idea of specifying a |
Stepping back, what are Service Workers as they exist today? They are a progressive enhancement to websites:
— MDN
— Service Workers Overview on developer.chrome.com If you were to apply the concept of Service Workers (SWs) to extensions, what is the "website"? As extensions are a progressive enhancement to the browser, the browser is to extensions as what websites are to SWs. SW lifetimes are independent of website lifetimes; SWs give websites superpowers. The various execution limits imposed by the browser make sense in this context, as does the more limited API surface available to SWs. When it comes to extensions, the "website" is the browser itself. Here, limiting the lifespan of extension SWs doesn’t make sense (#72 (comment)), and neither does reducing the API surface available to extension background pages in Manifest V2 (#72). While there are real use cases the SW-based extensions are meant to address (such as getting extensions to gracefully handle termination in a multiprocess environment on mobile (#51 (comment), #25)), SWs as they exist now in Google's Manifest V3 are not the answer. SWs are a standard for websites, not for browser extensions. If applied as a foundation for all extensions, Service Workers are an inherently user-hostile technology (#51). |
A new problem: Chrome implementation bans |
Do you think that's something to put into a use case for #72 ? |
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:
I propose to add a new Worker type like ServiceWorker,
WebExtensionWorker
. Thus we can gain the following benefits:[Expose]
The text was updated successfully, but these errors were encountered: