Background
- currently
scripting.executeScript / tabs.executeScript require one to define the tabId of the main_frame or sub_frame to inject the content script in.
- 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:
Background
scripting.executeScript/tabs.executeScriptrequire one to define the tabId of the main_frame or sub_frame to inject the content script in.Proposal
Allow to only specify a
frameIdas target when runningscripting.executeScript/tabs.executeScript. This basically means eithertabIdorframeIdwill be required when runningexecuteScriptorinsertCSS.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: