mirror of
https://github.com/servo/servo.git
synced 2025-10-17 00:39:15 +01:00
32 lines
576 B
Text
32 lines
576 B
Text
[SecureContext]
|
|
interface mixin NavigatorIdle {
|
|
readonly attribute IdleManager idle;
|
|
};
|
|
|
|
Navigator includes NavigatorIdle;
|
|
WorkerNavigator includes NavigatorIdle;
|
|
|
|
[
|
|
SecureContext,
|
|
Exposed=(Window,Worker)
|
|
] interface IdleManager {
|
|
Promise<IdleStatus> query(optional IdleOptions options);
|
|
};
|
|
|
|
dictionary IdleOptions {
|
|
unsigned long threshold;
|
|
};
|
|
|
|
[
|
|
SecureContext,
|
|
Exposed=(Window,Worker)
|
|
] interface IdleStatus : EventTarget {
|
|
readonly attribute IdleState state;
|
|
attribute EventHandler onchange;
|
|
};
|
|
|
|
enum IdleState {
|
|
"active",
|
|
"idle",
|
|
"locked"
|
|
};
|