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.
The properties associated with the confirm prompt feature are:
- timeout: The time before the
onPromptcallback will be fired.
- promptTimeout: How long the prompt should last before going idle in milliseconds.
- onPrompt: Function called after the idle timeout is reached.
The methods associated with the confirm prompt feature are:
- isPrompted(): Returns true if the prompt is displayed.
Examples will be added once v5 is out of beta. For now you can check out the simple examples in the API section.