Skip to content

Idle

Bindings for @solid-primitives/idle.

createIdleTimer

let createIdleTimer(
    ?idleTimeout: int,
    ?promptTimeout: int,
    ?onIdle: Event -> unit,
    ?onPrompt: Event -> unit,
    ?onActive: Event -> unit,
    ?startManually: bool,
    ?events: Event[],
    ?element: HtmlElement
    ): IdleTimer

Tracks whether the user is idle.

IdleTimer

type IdleTimer = interface
MemberTypeDesc
isIdleAccessor<bool>Whether the user is idle.
isPromptedAccessor<bool>Whether the user is in the prompt period.
startunit -> unitStarts the timer.
stopunit -> unitStops the timer.
resetunit -> unitResets the timer.
triggerIdleunit -> unitSets isIdle to true and calls onIdle with a custom manualidle event.
Edit this page