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 cannot use the theme function of the manifest, since it's not compatible.
theme.Theme
theme.getCurrent()
theme.update()
theme.reset()
theme.update()
.theme.onUpdated
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
Theme |
No |
No |
55 |
? |
No |
No |
? |
? |
No |
? |
? |
? |
getCurrent |
No |
No |
58 |
? |
No |
No |
? |
? |
No |
? |
? |
? |
onUpdated |
No |
No |
58 |
? |
No |
No |
? |
? |
No |
? |
? |
? |
reset |
No |
No |
56 |
? |
No |
No |
? |
? |
No |
? |
? |
? |
update |
No |
No |
55 |
? |
No |
No |
? |
? |
No |
? |
? |
? |
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/theme