Open Bug 1458947 Opened 6 years ago Updated 2 years ago

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

Categories

(WebExtensions :: General, enhancement, P3)

60 Branch
enhancement

Tracking

(Not tracked)

People

(Reporter: rpl, Unassigned)

References

Details

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`.
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
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.