New issue
Advanced search Search tips

Issue 598221 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 426862
Owner:
Closed: Apr 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

chrome.tabs.executeScript and chrome.tabs.insertCSS fail when property details.frameId is set

Reported by rich...@tech-jocks.com, Mar 27 2016

Issue description

Chrome Version       : 49.0.2623.108
OS Version: OS X 10.11.4

When implementing programatic injection of js or css with appropriate permissions set in manifest.json, both chrome.tabs API calls executeScript and insertCss fail whenever the details.frameId is specified in the call.

chrome.tabs.executeScript(tabId, {
                code: 'document.body.style.backgroundColor="red"',
                allFrames: true,
                frameId: frameId
            });

Result: Error: Invalid value for argument 2. Property 'frameId': Unexpected property.

Even with the frameId set to 0 (the default top frame) - the call still fails. Only when the reference to frameId is removed completely from the object will the API call succeed.

This does not match the documentation for the chrome.tabs API methods: https://developer.chrome.com/extensions/tabs#method-executeScript
 
Components: Platform>Extensions
Labels: Documentation-SampleCode
Status: Untriaged (was: Unconfirmed)
Marking the above issue as Untriaged as the above issue is related to documentation.
I understand it may be a documentation issue, but can I get a statement from someone at Platform>Extensions whether or not this is a feature in the chrome.tabs API - and if so - what is the implementation of it?
Owner: rob@robwu.nl
Status: Assigned (was: Untriaged)
This was added in r374057 (https://codereview.chromium.org/1628423002)

The doc mysteriously says available since 39, but it should really be only available in latest chrome (canary/dev) or maybe even m50. @richard Can you try this in chrome canary?

Assigning to rob@ to triage.
I just tried it in Chrome 50.0.2661.75 which was recently released. Both executeScript and insertCSS now work as documented. So, version 50 is the earliest version the frameId is supported in those methods.

Comment 5 by rob@robwu.nl, Apr 15 2016

Mergedinto: 426862
Status: Duplicate (was: Assigned)
The docserver has quite a few problems with listing the correct availability data..

Sign in to add a comment