theme
@fungi.computer/stipe / theme
Type Aliases
Section titled “Type Aliases”ThemeListener
Section titled “ThemeListener”ThemeListener = (
theme) =>void
Receives the current theme after a matching attribute mutation.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
Functions
Section titled “Functions”applyTheme()
Section titled “applyTheme()”applyTheme(
theme,root?):void
Set the Daisy theme name. Persistence and application policy stay with the host.
Parameters
Section titled “Parameters”string
HTMLElement
Returns
Section titled “Returns”void
getTheme()
Section titled “getTheme()”getTheme(
root?):string|null
Read the Daisy theme name from the root element, when available.
Parameters
Section titled “Parameters”HTMLElement
Returns
Section titled “Returns”string | null
subscribeTheme()
Section titled “subscribeTheme()”subscribeTheme(
listener,root?): () =>void
Subscribe to root data-theme mutations without owning browser policy.
Parameters
Section titled “Parameters”listener
Section titled “listener”HTMLElement
Returns
Section titled “Returns”() => void