Re: [wake-lock] Losing reference to a WakeLock object is a bug or intended behavior (#199)

I think that might work, so let's have that discussion now before implementation proceeds :-)

```webidl
enum WakeLockType { "screen", "system" };

dictionary WakeLockRequestOptions {
  AbortSignal? signal = null;
};

[SecureContext, Exposed=(DedicatedWorker, Window)]
interface WakeLockManager {
  [Exposed=Window] static Promise<PermissionState> requestPermission(WakeLockType type);

  // Promise never resolves, so will fail or be aborted
  // In the future it could resolve if a timeout is set as part of options
  static Promise<void> request(WakeLockType type, optional WakeLockRequestOptions options);
};
```

What do people think? @rakuco @marcoscaceres @domenic @reillyeon @jakearchibald 

-- 
GitHub Notification of comment by kenchris
Please view or discuss this issue at https://github.com/w3c/wake-lock/issues/199#issuecomment-488238555 using your GitHub account

Received on Wednesday, 1 May 2019 08:56:06 UTC