mirror of
https://github.com/servo/servo.git
synced 2025-07-02 04:53:39 +01:00
23 lines
485 B
Text
23 lines
485 B
Text
enum WakeLockType {
|
|
"screen",
|
|
"system"
|
|
};
|
|
|
|
partial interface Navigator {
|
|
[SecureContext] Promise<WakeLock> getWakeLock(WakeLockType type);
|
|
};
|
|
|
|
[SecureContext,
|
|
Exposed=Window]
|
|
interface WakeLock : EventTarget {
|
|
readonly attribute WakeLockType type;
|
|
readonly attribute boolean active;
|
|
attribute EventHandler onactivechange;
|
|
WakeLockRequest createRequest();
|
|
};
|
|
|
|
[SecureContext,
|
|
Exposed=Window]
|
|
interface WakeLockRequest {
|
|
void cancel();
|
|
};
|