76
edits
| Line 97: | Line 97: | ||
| addIdleObserver(), e.g. addIdleObserver(someIdleObserverObject); | | addIdleObserver(), e.g. addIdleObserver(someIdleObserverObject); | ||
| someIdleObserverObject = {time: someIntValInSeconds, onidle: someIdleCallbackFunction; onactive: someActiveCallbackFunction} | | someIdleObserverObject = {time: someIntValInSeconds, onidle: someIdleCallbackFunction; onactive: someActiveCallbackFunction} | ||
| The idleObserverObject is passed as a paramater to function addIdleObserver(). 'someIntValInSeconds' is the requested idle time in seconds that needs to elapse before the idle observer receives 'idle' notifications. 'someIntValInSeconds' must be a minimum of 1 | | The idleObserverObject is passed as a paramater to function addIdleObserver(). 'someIntValInSeconds' is the requested idle time in seconds that needs to elapse before the idle observer receives 'idle' notifications. 'someIntValInSeconds' must be a minimum of 1 second and a maximum of a PRUint32. Erroneous requested idle times are checked. 'someIdleCallbackFunction' is the front-end developer defined callback function that is to be called when the user is idle for 'someIntValInSeconds'. 'someActiveCallbackFunction' is the front-end developer defined callback function that is to be called when the user transitions from an idle state to an active state. Please see sample test file: http://mxr.mozilla.org/mozilla-central/source/dom/base/test/test_bug715041.xul | ||
|- | |- | ||
| ''In:'' | | ''In:'' | ||
edits