Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Extension APIs: chrome.browserAction.setIcon fails with numerical tabId #8500

Closed
jonathansampson opened this issue Apr 26, 2017 · 1 comment

Comments

@jonathansampson
Copy link
Collaborator

When chrome.browserAction.setIcon is called with an explicit tabId, Brave fails to set the new image. The following steps will demonstrate this issue:

  1. Enable Honey (it should start with a gray icon)
  2. Navigate to Honey's background page
  3. From the console, run Script A (seen below)
  4. Note that the icon is still gray for all tabs
  5. From the console, run Script B (seen below)

Script A:

chrome.tabs.query({}, tabs => {
    tabs.forEach(tab => {
        chrome.browserAction.setIcon({
            path: {
                19: "icons/active-19.png",
                38: "icons/active-38.png"
            },
            tabId: tab.id
        })
    })
})

Script B:

chrome.tabs.query({}, tabs => {
    tabs.forEach(tab => {
        chrome.browserAction.setIcon({
            path: {
                19: "icons/active-19.png",
                38: "icons/active-38.png"
            }
        })
    })
})
@jonathansampson jonathansampson added this to the 0.15.1 milestone Apr 26, 2017
@jonathansampson jonathansampson changed the title Extension APIs: chrome.browserAction.setIcon fails with tabId Extension APIs: chrome.browserAction.setIcon fails w/ tabId Apr 26, 2017
@jonathansampson
Copy link
Collaborator Author

Blocks #8118

@jonathansampson jonathansampson changed the title Extension APIs: chrome.browserAction.setIcon fails w/ tabId Extension APIs: chrome.browserAction.setIcon fails with non-null tabId Apr 26, 2017
@jonathansampson jonathansampson changed the title Extension APIs: chrome.browserAction.setIcon fails with non-null tabId Extension APIs: chrome.browserAction.setIcon fails with numerical tabId Apr 26, 2017
@jonathansampson jonathansampson self-assigned this Apr 26, 2017
@bbondy bbondy modified the milestones: 0.15.3, 0.15.2 May 2, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.