chromium/third_party/blink/web_tests/wpt_internal/system-wake-lock/resources/system-wake-lock.idl

enum WakeLockType { "system" };

[SecureContext]
partial interface Navigator {
  [SameObject] readonly attribute WakeLock wakeLock;
};

[SecureContext]
partial interface WorkerNavigator {
  [SameObject] readonly attribute WakeLock wakeLock;
};

[SecureContext, Exposed=(DedicatedWorker, Window)]
interface WakeLock {
  Promise<WakeLockSentinel> request(optional WakeLockType type = "screen");
};

[SecureContext, Exposed=(DedicatedWorker, Window)]
interface WakeLockSentinel : EventTarget {
  readonly attribute WakeLockType type;
  Promise<void> release();
  attribute EventHandler onrelease;
};