Closed Bug 1346941 Opened 7 years ago Closed 6 years ago

tabs.executeScript() 'frameId' and 'allFrames' are mutually exclusive

Categories

(WebExtensions :: Compatibility, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1454342

People

(Reporter: memmie, Unassigned)

References

()

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:53.0) Gecko/20100101 Firefox/53.0
Build ID: 20170307064827

Steps to reproduce:

Document for tabs.executeScript() say "'allFrames' [...] If 'true' and 'frameId' is set, then the code will be injected into the specified frame and all its child frames.".

If you do:
browser.tabs.executeScript({code: "console.log(document.URL+ ' say Hi!')", frameId: 0, allFrames: true})


Actual results:

You get an error (promise rejection) "Error: 'frameId' and 'allFrames' are mutually exclusive"


Expected results:

No rejection/error
Status: UNCONFIRMED → NEW
Component: Add-ons → Compatibility
Ever confirmed: true
Product: Developer Documentation → WebExtensions
Steps to reproduce:
1. Download attachment and extract the index.html file from it.
2. Load the extension (the zip file) via about:debugging.
3. Open index.html in the browser.
4. Click on the extension (browserAction) button and confirm that all frames turn red.
5. Click on the extension (browserAction) button and confirm that all frames turn white again.
6. Now right-click in any frame, and click on the ""executeScript ({ frameId, allFrames: true })" menu item.

Expected:
- After step 6, the frame and all of its descendants should be pink.

Actual:
- Nothing happens.
The console shows the following error:
Unchecked lastError value: Error: 'frameId' and 'allFrames' are mutually exclusive


This works as expected in Chrome (in Chrome the extension needs to be given local file access at the extensions page before the extension can run scripts in the test page though).
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
The other bug was marked WONTFIX, but this is an incompatibility with Chrome, so I'm re-opening it.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Please don't forward dupe bugs.
Status: REOPENED → RESOLVED
Closed: 6 years ago6 years ago
Resolution: --- → DUPLICATE
Apologies for the duplicate/unduplicate bug spam, we are going to use the other bug because it was triaged first.
No longer blocks: webextensions-chrome-gaps
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: