| dictionary IdleOptions { |
| unsigned long threshold; |
| }; |
| |
| [ |
| SecureContext, |
| Constructor(optional IdleOptions options), |
| Exposed=(Window,Worker) |
| ] interface IdleDetector : EventTarget { |
| readonly attribute IdleState state; |
| attribute EventHandler onchange; |
| Promise<any> start(); |
| void stop(); |
| }; |
| |
| [ |
| SecureContext, |
| Exposed=(Window,Worker) |
| ] interface IdleState { |
| readonly attribute UserIdleState user; |
| readonly attribute ScreenIdleState screen; |
| }; |
| |
| enum UserIdleState { |
| "active", |
| "idle" |
| }; |
| |
| enum ScreenIdleState { |
| "locked", |
| "unlocked" |
| }; |