chromium/third_party/blink/renderer/modules/wake_lock/wake_lock.idl

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// https://w3c.github.io/screen-wake-lock/#the-wakelocktype-enum
enum WakeLockType {
  "screen",
  "system"
};

// https://w3c.github.io/screen-wake-lock/#the-wakelock-interface
[
  SecureContext,
  Exposed(DedicatedWorker SystemWakeLock, Window WakeLock)
] interface WakeLock {
  [CallWith=ScriptState, RaisesException] Promise<WakeLockSentinel> request(optional WakeLockType type = "screen");
};