| // Copyright 2018 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| enum WakeLockType { |
| "screen", |
| "system" |
| }; |
| |
| // https://www.w3.org/TR/wake-lock |
| [ |
| ActiveScriptWrappable, |
| SecureContext, |
| Exposed=Window, |
| RuntimeEnabled=WakeLockNavigator |
| ] interface WakeLock : EventTarget { |
| readonly attribute WakeLockType type; |
| readonly attribute boolean active; |
| |
| attribute EventHandler onactivechange; |
| WakeLockRequest createRequest(); |
| }; |