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

Extension APIs: chrome.browserAction.setBadgeText fails with tabId #8501

Closed
jonathansampson opened this issue Apr 26, 2017 · 2 comments
Closed

Comments

@jonathansampson
Copy link
Collaborator

When chrome.browserAction.setBadgeText is called with an explicit tabId, Brave fails to set the new badge text. 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 text 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.setBadgeText({
      text: 'xyz',
      tabId: tab.id
    })
  })
})

Script B

chrome.tabs.query({}, tabs => {
  tabs.forEach(tab => {
    chrome.browserAction.setBadgeText({
      text: 'xyz'
    })
  })
})
@jonathansampson
Copy link
Collaborator Author

Blocks #8118

@luixxiul
Copy link
Contributor

How to navigate to Honey's background page?

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

No branches or pull requests

5 participants