FixIt JavaScript API
    Preparing search index...

    Class ThemeModule

    Theme module — color scheme switching and theme-color meta tag management.

    Responsibilities:

    • Toggle between light, dark, and auto color schemes.
    • Update <meta name="theme-color"> based on current scheme.
    • Persist user preference to localStorage.

    Implements

    Index
    • Apply a theme mode and emit the fixit:switch-theme event.

      Parameters

      • mode: string

        'auto', 'light', or 'dark'.

      • persist: boolean = true

        Whether to save the choice to localStorage (default: true).

      Returns void