Open Bug 1458947 Opened 2 years ago Updated 2 months ago

Optionally allow a content script registered using contentScripts.register to be injected on existing tabs that matches


(WebExtensions :: General, enhancement, P3)

60 Branch


(Not tracked)


(Reporter: rpl, Unassigned)



When content scripts are specified in the manifest.json file and the extension is installed, its content scripts are injected in the existing tabs that they match, on the contrary content scripts registered programmatically using contentScripts.register are only going to be executed in the existing tabs on the next page loads that they match.

It seems reasonable to support this behavior on the contentScripts.register API, eventually based on an additional options, e.g. `includeExisting: true`.
See Also: → 1437098
Such a flag could also be useful for the manifest-declared content_scripts.
Priority: -- → P2
Product: Toolkit → WebExtensions

ISTM that scripts could be injected by other mechanisms by the extension, so lowering priority.

Priority: P2 → P3
You need to log in before you can comment on or make changes to this bug.