mirror of
https://github.com/servo/servo.git
synced 2025-10-14 23:40:26 +01:00
25 lines
495 B
Text
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 = {});
|
|
};
|