Verify MV3 compatibility for dynamic content scripts
Categories
(WebExtensions :: General, task)
Tracking
(Not tracked)
People
(Reporter: mixedpuppy, Unassigned)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
(Whiteboard: mv3:m2 [mv3-m2])
The following features will be added to MV3 soon:
Dynamic content scripts: the new Scripting API lets extensions register and unregister content scripts at runtime.
We've had dynamic functionality, it may need updating for MV3 compat.
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/contentScripts
https://developer.chrome.com/docs/extensions/mv3/intro/mv3-overview/
Comment 1•5 years ago
|
||
It certainly needs updating. The new dynamic content script API is distinct from Firefox's, because Firefox's current design of the contentScripts (and userScripts) APIs are not compatible with suspendible service workers. In these APIs, the content script registration disappears when the script context is unloaded.
Chrome's chrome.scripting API is being developed at https://bugs.chromium.org/p/chromium/issues/detail?id=1054624
Comment 2•5 years ago
|
||
We discussed about this some times ago, contentScripts and userScripts are going to be two of the APIs that would require to be adapted to support contexts that could be suspended and resumed.
Bug 1587876 is a tracking issue we filed some times ago to track the API that needs to be adapted, Bug 1587883 is the issue we filed at the time to track specifically contentScripts and userScripts APIs (in the issue description there is a brief description of what should be changed to support suspendible service workers, which would be based on requiring a new id property)
The changes briefly described in Bug 1587883 were aiming to make contentScripts API compatible with "suspendible" extension contexts, but the API they are currently designing for Chrome may end up diverging enough to don't make our contentScripts API compatible with theirs as is.
In the issue linked by Rob there is also this google document with some more detailed specs.
| Reporter | ||
Updated•4 years ago
|
| Reporter | ||
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 4•4 years ago
|
||
This does not seem relevant now that scripting.registerContentScripts() and related methods have landed for MV3 (Bug 1736582).
Description
•