Issue metadata
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
,
Mar 28 2016
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?
,
Apr 15 2016
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.
,
Apr 15 2016
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.
,
Apr 15 2016
The docserver has quite a few problems with listing the correct availability data.. |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by ashej...@chromium.org
, Mar 28 2016Labels: Documentation-SampleCode
Status: Untriaged (was: Unconfirmed)