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