Plan to support FetchEvent for a service worker
Categories
(WebExtensions :: Untriaged, enhancement)
Tracking
(Not tracked)
People
(Reporter: danny0838, Unassigned)
Details
Expected results:
What is the current for the support of FetchEvent in an extension service worker?
According to my test, manifest v2 doesn't seem to support navigator.serviceWorker in the background page or any extension page. (Always throws a DOMException when called.)
However, manifest v3 will replace the background page with a background service worker. A service worker normally supports FetchEvent, which is powerful and can "host" almost any dynamic content, including arbitrary scripts.
Is there any plan about the support of FetchEvent in the manifest v3 background service worker? Will there be any CSP or protection/restriction?
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'WebExtensions::Untriaged' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Related Chromium bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1292439
Comment 3•3 years ago
|
||
This is technically a duplicate of Bug 1344561.
As a side note, we briefly discussed about FetchEvent in extension service workers before, and the consensus in the team was that making an extension service worker to intercept and handle requests to moz-extension:// urls is something that we would prefer to don't allow.
The main reason is that moz-extension:// urls are currently expected to be static resources packages with the extension, and allowing an extension service worker to synthesize some would change that assumption and it would turn into one more source of remote code execution.
Description
•