Contains functions and logic to handle the idle state of the user.
Members
-
inner idleTime :number
-
Total time of user inactivity in seconds.
Methods
-
inner addResumeFunction(f)
-
Registers a function to be called when the user resumes from being idle.
Parameters:
Name Type Description f
function The function to be executed on resume.
-
inner idleReset()
-
Resets the idle timer. This function is called when the user becomes active after being idle.
-
inner idleSet()
-
Sets the idle state immediately, regardless of the actual idle time.
-
inner isIdle() → {boolean}
-
Checks if the user is currently idle.
Returns:
boolean -True if the user is idle, false otherwise.
-
inner setupIdle()
-
Initializes the idle handling setup, attaching necessary event listeners.