Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (21 sloc) 0.766 kb

Idle Timer for ExtJs 4

Inspired by Idle Timer for YUI by Nicolas Zakas.

Installation

Copy source files to your project, use Ext.require() to use it in your application.

Usage

Create Util.IdleTimer object and use start() function to start timer. Assign idle and/or active listeners to perform actions when timer went into idle or active state.

var timer = Ext.create('Util.IdleTimer', {
    timeout: 10000,
    listeners: {
        idle: function(){
            console.log('Application went into idle state');
        },
        active: function(){
            console.log('Application went into active state');
        }
    }
});

timer.start();
Jump to Line
Something went wrong with that request. Please try again.