Skip to content

Proposal: scripting.executeScript without specifying tabId #91

@carlosjeurissen

Description

@carlosjeurissen

Background

  1. currently scripting.executeScript / tabs.executeScript require one to define the tabId of the main_frame or sub_frame to inject the content script in.
  2. extension popups have their tabId set to -1 (no tabId). This makes sense as they are no tabs, but puts limitations like the inability to use executeScript for iframes within extension popups.

Proposal

Allow to only specify a frameId as target when running scripting.executeScript / tabs.executeScript. This basically means either tabId or frameId will be required when running executeScript or insertCSS.

Reasoning

This will allow dynamic contentscript to be injected into frames within non-tab environments like extension popups, and to allow injection of script when it's faster / more convenient to not specify a tabId.

Requirement

All frameIds should be unique for this to be implemented. See:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions