theme

ブラウザー拡張機能がブラウザーのテーマを更新できるようにします。

この API を使用するには、拡張機能の manifest.json ファイルで "theme" パーミッション を要求しなければなりません。

メモ: バックグランドファイルでテーマをセットアップする場合、'theme' パーミッションを宣言しなければなりません。さもなければ、manifest の theme 関数を使用できません。

theme.Theme

テーマのコンテンツを表します。

関数

theme.getCurrent()

現在のブラウザーテーマを取得します。

theme.update()

ブラウザーのテーマを更新します。

theme.reset()

theme.update() の呼び出しで更新されたテーマをすべて削除します。

イベント

theme.onUpdated

ブラウザーテーマが変更された時に発火。

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Firefox for Android
Safari on iOS
theme
Theme
getCurrent
onUpdated
reset
reset.windowId
update
update.windowId

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support

Example extensions