Skip to content

Proposal: RegisteredContentScript.workers property to inject WorkerScope(s)  #538

@hackademix

Description

@hackademix

(As discussed in #103)

Main world scripts should be able to modify JavaScript-accessible object (e.g. DOM prototypes or built-in functions) in a way that is transparent and cannot be subverted by page scripts., e.g. to modify or intercept the behavior of built-in objects for additional security, privacy and/or anti-fingerprinting reasons.

This requires them to be injected and running before site scripts in any scope, including WorkerScope(s) (workers, shared workers and service workers), otherwise these scope can be use to circumvent the main browsing context modifications.

Therefore, in addition to the RegisteredContentScript properties already specified, we propose to add:

  • workers Optional
    boolean, default false: if true, all the Worker, SharedWorker and ServiceWorker scopes which are associated to the browsing contexts matched this RegisteredContentScript filters will be injected as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementEnhancement or change to an existing featureneutral: firefoxNot opposed or supportive from FirefoxproposalProposal for a change or new featuresupportive: chromeSupportive from Chromesupportive: safariSupportive from Safari

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions