Movatterモバイル変換


[0]ホーム

URL:


  1. Mozilla
  2. Add-ons
  3. Browser extensions
  4. JavaScript APIs
  5. theme

theme

Enables browser extensions to get details of the browser's theme and update the theme.

You can use this API to include a theme in your extension, which you define as atheme.Theme and apply usingtheme.update(). You cannot include a static theme in your extension, defined with the"theme" manifest key. The "theme" manifest key is used to define static themes only. SeeThemes on Extension Workshop for more information.

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 totheme.update().

Events

theme.onUpdated

Fired when the browser theme changes.

Example extensions

Browser compatibility

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp