Open Bug 1891480 Opened 6 months ago Updated 6 months ago

Support scripting.executeScript without specifying tabId

Categories

(WebExtensions :: General, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: robwu, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

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

scripting.executeScript currently requires a valid tabId and frameId to execute code.
There is consensus in the WECG to expand the targeting, as follows:

  • Permit non-zero frameId without tabId. This enables extensions to execute code in frames of non-tabs, such as extension popups.
  • Allow any documentId without tabId (dependent on bug 1891478). The advantage of this over frameId is that documentId uniquely identify documents in frames, including top-level frames, without race conditions.

See also https://github.com/w3c/webextensions/issues/91

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