76
edits
Line 97: | Line 97: | ||
|- | |- | ||
| ''In:'' | | ''In:'' | ||
| addIdleObserver() | | addIdleObserver(), e.g. addIdleObserver(idleObserverObject); | ||
| | | idleObserverObject = {time: someIntValInSeconds, onidle: someIdleCallbackFunction; onactive: someActiveCallbackFunction} | ||
| The requested idle time in seconds | | 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 seconds and a maximum of a PRUint32. '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:'' | ||
| removeIdleObserver() | | removeIdleObserver(), e.g. removeIdleObserver(idleObserverObject) | ||
| | | idleObserverObject = {time: someIntValInSeconds, onidle: someIdleCallbackFunction; onactive: someActiveCallbackFunction} | ||
| The requested idle time in seconds | | 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 seconds and a maximum of a PRUint32. '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 | ||
|- | |- | ||
| ''Out:'' | | ''Out:'' |
edits