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

Extension APIs: chrome.browserAction.setBadgeBackgroundColor fails with tabId #8502

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

Comments

@jonathansampson
Copy link
Collaborator

When chrome.browserAction.setBadgeBackgroundColor is called with an explicit tabId, Brave fails to set the new color. 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 badge color is not set for all tabs
  5. From the console, run Script B (seen below)

Script A

chrome.tabs.query({}, tabs => {
  tabs.forEach(tab => {
    chrome.browserAction.setBadgeBackgroundColor({
      color: 'red',
      tabId: tab.id
    })
  })
})

Script B

chrome.tabs.query({}, tabs => {
  tabs.forEach(tab => {
    chrome.browserAction.setBadgeBackgroundColor({
      color: 'red'
    })
  })
})
@jonathansampson
Copy link
Collaborator Author

Blocks #8118

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.