W3C home > Mailing lists > Public > public-device-apis-log@w3.org > May 2019

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

From: Kenneth Rohde Christiansen via GitHub <sysbot+gh@w3.org>
Date: Wed, 01 May 2019 11:44:48 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-488263402-1556711086-sysbot+gh@w3.org>
Actually, we could make this work with less changes to the current API

```webidl
[Constructor(WakeLockType type), SecureContext, Exposed=(DedicatedWorker, Window)]
interface WakeLock  {
  [Exposed=Window] static Promise<PermissionState> requestPermission(WakeLockType type);
  readonly attribute 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
  Promise<void> request(optional WakeLockRequestOptions options);
};
```

-- 
GitHub Notification of comment by kenchris
Please view or discuss this issue at https://github.com/w3c/wake-lock/issues/199#issuecomment-488263402 using your GitHub account
Received on Wednesday, 1 May 2019 11:44:49 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 1 May 2019 11:44:50 UTC