TyphonJS Runtime Library (FVTT) 0.3.0
  • #runtime/svelte/action/dom/focus
  • isFocused

Function isFocused

  • isFocused(
        node: HTMLElement,
        storeFocused: MinimalWritable<boolean>,
    ): ActionReturn<MinimalWritable<boolean>>
  • Provides an action to monitor focus state of a given element and set an associated store with current focus state.

    This action is usable with any writable store.

    Parameters

    • node: HTMLElement

      Target element.

    • storeFocused: MinimalWritable<boolean>

      Update store for focus changes.

    Returns ActionReturn<MinimalWritable<boolean>>

    Lifecycle functions.

Settings

Member Visibility
Demo - Essential Svelte ESM
TyphonJS Runtime Library (FVTT) 0.3.0