blob: c14d783d4dee8e1a28ecc7966084e25873fc05ae [file] [log] [blame]
/* The origin of this IDL file is
* https://www.w3.org/TR/screen-wake-lock/#idl-index
*/
[SecureContext]
partial interface Navigator {
[SameObject] readonly attribute WakeLock wakeLock;
};
[SecureContext, Exposed=(Window)]
interface WakeLock {
Promise<WakeLockSentinel> request(WakeLockType type);
};
[SecureContext, Exposed=(Window)]
interface WakeLockSentinel : EventTarget {
readonly attribute boolean released;
readonly attribute WakeLockType type;
Promise<undefined> release();
attribute EventHandler onrelease;
};
enum WakeLockType { "screen" };