Enables browser extensions to update the browser theme.
To use this API, an extension must request the "theme" permission 在其 manifest.json 文件。
注意: 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
Represents the content of a theme.
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()
.
theme.onUpdated
Fired when the browser theme has been changed.
BCD tables only load in the browser
最后修改: , 由 MDN 贡献者