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
| Member | Type | Desc |
|---|---|---|
isIdle | Accessor<bool> | Whether the user is idle. |
isPrompted | Accessor<bool> | Whether the user is in the prompt period. |
start | unit -> unit | Starts the timer. |
stop | unit -> unit | Stops the timer. |
reset | unit -> unit | Resets the timer. |
triggerIdle | unit -> unit | Sets isIdle to true and calls onIdle with a custom manualidle event. |
