There are 2 callbacks supported, onAway and onAwayBack, both of which takes no parameters. onAway is trigger whenever the there is no activity inside the webpage by the user for the length of the timeout specified. onAwayBack is triggered whenever there is an activity inside the webpage by the user.
One method exposed to set the timeout setAwayTimeout(int), which takes an integer of when to trigger the onAway event.
The constructor also accepts a configuration object with all of these methods.
Here is an example of usage:
There is a demo of this on on github here.
The project is hosted here.