Open
Bug 1484840
Opened 7 years ago
Updated 2 years ago
Add browserAction.setThemeIcons API
Categories
(WebExtensions :: Themes, enhancement, P3)
WebExtensions
Themes
Tracking
(Not tracked)
NEW
People
(Reporter: Oriol, Unassigned)
Details
(Whiteboard: [design-decision-needed])
One can use theme_icons in the browser_action manifest API in order to define different icons for light themes than for dark ones.
This is useful for simple extensions, but I need to generate my icons dynamically with browserAction.setIcon, so I can't define them in the manifest.
However, I still want different icons for light and dark themes. So I want an API like `browser.browserAction.setThemeIcons(details)`, where `details` has these properties:
- An optional `windowId` to restrict the theme icons to a single window
- An optional `tabId` to restrict the theme icons to a single tab
- Either an `imageData` or `path` property, whose value is an array of objects with these properties:
- `dark`: an URL (for `path`) or an ImageData (for `imageData`) corresponding to a variant of the icon for themes with dark text
- `light`: an URL (for `path`) or an ImageData (for `imageData`) corresponding to a variant of the icon for themes with light text
- `size`: the size of both icons
![]() |
||
Updated•6 years ago
|
Component: Frontend → Themes
Priority: -- → P3
Comment 2•5 years ago
|
||
This looks like it's already technically implemented. ExtensionActions.jsm has setIcon, which eventually ends up in normalize that does indeed look for theme icons[1]. It may be that the schemas need to be modified.
Flags: needinfo?(mixedpuppy)
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•