servo/tests/wpt/web-platform-tests/idle-detection/idle-detection.idl

25 lines
495 B
Text

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;
Promise<any> start(optional IdleOptions options = {});
};