In a WebExtensions
browser_action.theme_icon can be used to specify light and dark theme icons for the browser action button.
However, there does not seem to be a way to provide a theme-aware icon set when changing the browser action button’s icon using
Ideally, I would be able to pass the same
theme_icon object type used in the
browserAction.setIcon() and have the browser pick the new theme-appropriate icon in the same manner as it did determining the initial icon from the manifest file.
My use case: I want my browser action button icon to indicate a state of my extension and I want the icon to be appropriate in both light and dark themes.
Any ideas or suggestions on how to achieve this?