-
Notifications
You must be signed in to change notification settings - Fork 71
Description
This is related to #44, #11, #25, #39 and #73.
Service Worker-based extensions are Event Pages (persistent: false background pages) made mandatory and with additionally degraded capabilities. Some extensions fit the non-persistent/ephemeral model well. Many do not. Requiring all extensions to become non-persistent appears to be a fundamentally extension developer and user hostile requirement. It violates "user-centered", "compatibility", "performance" and "maintainability" design principles.
The downsides of Service Workers-based extensions include higher development1 and debugging2 complexity, worse performance3, and missing features (no DOM!). The third point in particular gates innovation behind browser developers. Working on an idea that requires Web APIs not supported in SWs4? Now at minimum you have to get Chromium and Firefox on board.
Consider also that there are still unaddressed showstopper bugs5 as well as inexplicable functionality gaps (such as #93) with SW-based extensions in Chrome.
Background pages will be replaced by background service workers (bug 1578286). This is a substantial change and will continue to be developed over the next few months. We will make a new announcement once we have something that can be tested in Nightly.
What are the benefits of Service Worker-based extensions for extension developers? Is any public discussion available from the Mozilla side?
[1] See crbug 1185226 where a whole new, otherwise unnecessary storage API is created in an attempt to fill some of the egregious gaps in the ephemeral model. Also see crbug 1128240 that proposes headless windows (something you already get by default in MV2).
[2] Examples: degraded browser UX, missing tooling.
[3] An overview of the inherent performance problem, see also this crbug with further discussion.
[4] Examples: playing audio, using the clipboard, communicating via WebRTC data channels. In short, everything in Window and Document that's not also in WorkerGlobalScope.
[5] Examples:
- crbug 1024211: Manifest V3: webRequest listeners not called after service worker stops
- crbug 1189678: Chrome browser running a MV3 extension that uses Native Messaging does not respond to messages from the Native Messaging Host after 5 minutes.