idle-detection.idl (789B)
1 // GENERATED CONTENT - DO NOT EDIT 2 // Content was automatically extracted by Reffy into webref 3 // (https://github.com/w3c/webref) 4 // Source: Idle Detection API (https://wicg.github.io/idle-detection/) 5 6 enum UserIdleState { 7 "active", 8 "idle" 9 }; 10 11 enum ScreenIdleState { 12 "locked", 13 "unlocked" 14 }; 15 16 dictionary IdleOptions { 17 [EnforceRange] unsigned long long threshold; 18 AbortSignal signal; 19 }; 20 21 [ 22 SecureContext, 23 Exposed=(Window,DedicatedWorker) 24 ] interface IdleDetector : EventTarget { 25 constructor(); 26 readonly attribute UserIdleState? userState; 27 readonly attribute ScreenIdleState? screenState; 28 attribute EventHandler onchange; 29 [Exposed=Window] static Promise<PermissionState> requestPermission(); 30 Promise<undefined> start(optional IdleOptions options = {}); 31 };