Confirm Prompt
A common use case for IdleTimer is to detect when you user has gone idle and then prompt them to see if they are still there. Handling of this common use case is now built in to IdleTimer.
Properties#
The properties associated with the confirm prompt feature are:
- timeout: The time before the
onIdle
event will be emitted. - promptBeforeIdle: How long before idle to emit the
onPrompt
event. - onPresenceChange: Function called when a user's presence state changes.
- onPrompt: Function called after the idle timeout is reached.
Methods#
The methods associated with the confirm prompt feature are:
- isPrompted(): Returns true if the prompt is displayed.