Closed Bug 1759117 Opened 2 years ago Closed 2 years ago

`runAt` in `scripting.RegisteredContentScript` should not affect CSS injection

Categories

(WebExtensions :: General, enhancement, P2)

enhancement

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: willdurand, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [addons-jira])

runAt should only be used for js files and not css ones. Indeed, CSS should unconditionally be applied at document_start, cf. https://bugzilla.mozilla.org/show_bug.cgi?id=1755978#c1.

This isn't exactly trivial, which is why this bug exists, cf. https://bugzilla.mozilla.org/show_bug.cgi?id=1755976#c2.

Here is a sketch of how the unit tests can look be implemented: https://phabricator.services.mozilla.com/D140729?id=555542#inline-775448

Given this was already the behavior for MV2 extensions in Firefox and a workaround exists (i.e. register CSS and JS separately to control the runAt value for each), we decided to wontfix this bug. We'll make sure that the documentation mentions the difference between Chromium browsers and FF.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.