- From: Kenneth Rohde Christiansen via GitHub <sysbot+gh@w3.org>
- Date: Thu, 26 Sep 2019 10:09:14 +0000
- To: public-device-apis-log@w3.org
> I'd be ok with that... maybe just "release" tho, as shorter :) Yeah, sure :-) ```JS partial interface Navigator { [SameObject] readonly attribute WakeLock wakeLock; }; partial interface WorkerNavigator { [SameObject] readonly attribute WakeLock wakeLock; }; [Exposed=(Window,DedicatedWorker)] interface WakeLock { Promise<WakeLockSentinel> request(WakeLockType type); }; dictionary WakeLockEventInit { required unsigned WakeLockSentinel lock; }; [Exposed=(Window,DedicatedWorker)] interface WakeLockEvent : Event { constructor(DOMString type, WakeLockEventInit init); readonly attribute WakeLockSentinel lock; }; interface WakeLockSentinel : EventTarget { // can only be called once Promise<void> release(); readonly attribute WakeLockType type; attribute EventHandler onrelease; } ``` What is the point of the event giving you the `WakeLockSentinel`? Maybe it would be better to give the reason why it was released? But then again, if I call `release()` myself, I am not very interested in that event, so maybe a `systemrelease` event would make more sense? -- GitHub Notification of comment by kenchris Please view or discuss this issue at https://github.com/w3c/wake-lock/issues/226#issuecomment-535435998 using your GitHub account
Received on Thursday, 26 September 2019 10:09:16 UTC