With the recent release of manifest v3, background scripts are moving to server workers (https://developer.chrome.com/docs/extensions/mv3/migrating_to_service_workers/) but I didn't read anything that says that content scripts will finally be able to be injected into new workers created on a page. This is a shortcoming of current extension design (IMO) and I'm not entirely sure why Google and Mozilla do not make it possible.
There is at least one question from a few years back that addresses this and the only answer is to override the Worker constructor.
Chrome extension: script injection to workers and other nonpages
That's not an ideal solution and I'm not clear how to even inject my content script if I do override the constructor (any hints would be helpful).
Is content script injection into workers possible now (as of Feb 2021) or will be with the roll-out of manifest v3? @wOxxOm I'm hoping you have some insight.
1.4m articles
1.4m replys
5 comments
57.0k users