| dictionary IdleOptions { |
| [EnforceRange] unsigned long threshold; |
| AbortSignal signal; |
| }; |
| |
| enum UserIdleState { |
| "active", |
| "idle" |
| }; |
| |
| enum ScreenIdleState { |
| "locked", |
| "unlocked" |
| }; |
| |
| [ |
| SecureContext, |
| Exposed=(Window,Worker) |
| ] interface IdleDetector : EventTarget { |
| constructor(); |
| readonly attribute UserIdleState? userState; |
| readonly attribute ScreenIdleState? screenState; |
| attribute EventHandler onchange; |
| [Exposed=Window] static Promise<PermissionState> requestPermission(); |
| Promise<any> start(optional IdleOptions options = {}); |
| }; |