mirror of
https://github.com/servo/servo.git
synced 2025-07-11 17:33:47 +01:00
32 lines
567 B
Text
32 lines
567 B
Text
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"
|
|
};
|