blob: 1fd4d451be98c7fb12bb1734d8bfcb57ad60bfbd [file] [log] [blame]
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"
};