Activity Detection
The activity detection feature is responsible for notifying you when any of your watched events has been triggered, regardless of whether or not it will result in a change of idle state.
Properties#
The properties associated with activity detection are:
- events: The events to listen for activity on.
- element: The DOM element to bind event listeners to.
- onAction: Function called each time an event is triggered.
- throttle: Throttle the
onAction
callback in milliseconds. - debounce: Debounce the
onAction
callback in milliseconds. - startOnMount: Bind the events when the host component mounts. Defaults to
true
. - startManually: Require a call to
start()
in order to bind the events initally.
Methods#
The methods associated with activity detection are:
- start: Binds the events.
- pause: Unbinds events.
- resume: Rebinds events.
- getElapsedTime: Returns the ammount of milliseconds since the host component was mounted.