Home

# Class goog.ui.ActivityMonitor

Once initialized with a document, the activity monitor can be queried for the current idle time.

extends goog.events.EventTarget

Instance Method Summary
| `addDocument(?Document doc)` Adds a document to those being monitored by this class.

`disposeInternal()`

Unattach listeners from this object. Classes that extend EventTarget may need to override this method in order to remove references to DOM Elements and additional listeners, it should be something like this:

    MyClass.prototype.disposeInternal = function() {
    MyClass.superClass_.disposeInternal.call(this);
    // Dispose logic for MyClass
    };

| `getIdleTime(number= opt_now) ⇒ number` Returns the amount of time the user has been idle.
| `getLastEventTime() ⇒ number` Returns the time of the last event
| `getLastEventType() ⇒ string` Returns the type of the last user event.
| `handleEvent_(?goog.events.BrowserEvent e)` Updates the last event time when a user action occurs.
| `removeDocument(?Document doc)` Removes a document from those being monitored by this class.
| `resetTimer()` Updates the last event time to be the present time, useful for non-DOM events that should update idle time.
| `updateIdleTime_(number eventTime, string eventType)` Does the work of updating the idle time and firing an event