| // GENERATED CONTENT - DO NOT EDIT |
| // Content of this file was automatically extracted from the |
| // "Wake Lock API" spec. |
| // See: https://w3c.github.io/wake-lock/ |
| |
| 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(); |
| }; |