Enables browser extensions to update the browser theme.
To use this API, an extension must request the "theme" permission in its manifest.json file.
Types
theme.Theme
- Represents the content of a theme.
Functions
theme.getCurrent()
- Gets the current browser theme.
theme.update()
- Updates the browser’s theme.
theme.reset()
- Removes any theme updates made in a call to
theme.update()
.
Events
theme.onUpdated
- Fired when the browser theme has been changed.
Browser compatibility
Chrome | Edge | Firefox | Firefox for Android | Opera | |
---|---|---|---|---|---|
Theme | No | No | 55 | No | No |
getCurrent | No | No | 58 | No | No |
onUpdated | No | No | 58 | No | No |
reset | No | No | 56 * | No | No |
update | No | No | 55 * | No | No |