Enables browser extensions to update the browser theme.

To use this API, an extension must request the "theme" permission in its manifest.json file.

Note: When we set up a theme in a background file, we must declare the 'theme' permission and therefore we can not use the theme function of the manifest, it is incompatible

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

ChromeEdgeFirefoxFirefox for AndroidOpera
Theme No No55 No No
getCurrent No No58 No No
onUpdated No No58 No No
reset No No56 No No
update No No55 No No

Example extensions

Document Tags and Contributors

Contributors to this page: Sheppy, hellosct1, wbamberg, ntim, rebloor
Last updated by: Sheppy,