Open Bug 1875475 Opened 3 months ago Updated 3 months ago

Implement userScripts API in MV3

Categories

(WebExtensions :: General, enhancement, P2)

enhancement

Tracking

(Not tracked)

People

(Reporter: robwu, Unassigned)

References

(Depends on 2 open bugs)

Details

(Whiteboard: [wecg][addons-jira])

This is about implementing the userScripts API, as designed in the WECG at https://github.com/w3c/webextensions/issues/279 .

Not to be confused with the current userScripts API in Firefox that is tied to the user_scripts key from bug 1437098. This older API called "userScripts" is MV2-only because its design is incompatible with non-persistent background pages. Additional notes about differences: https://github.com/mdn/browser-compat-data/issues/21922#issuecomment-1892148953

Currently, the way that user script managers would use the API to run scripts in the main world is to use the userScripts API to have a world without scripts being restricted by the CSP. To enable that, we need to support the ability to exempt script nodes inserted by the "user script" world from the CSP (bug 1446231).

Depends on: 1446231

The capability to directly run scripts in the MAIN world is part of bug 1736575.

Depends on: 1736575
You need to log in before you can comment on or make changes to this bug.