- From: Raphael Kubo da Costa via GitHub <sysbot+gh@w3.org>
- Date: Tue, 04 Feb 2020 11:11:32 +0000
- To: public-device-apis-log@w3.org
How about this: ```js const sentinel = await navigator.wakeLock.request('screen'); checkbox.checked = true; const listener = (ev) => { checkbox.checked = false; ev.target.remoteEventListener('release', listener); }; sentinel.onrelease = listener; ``` (not sure whether it's clearer to use `onrelease` or `addEventListener` for symmetry) -- GitHub Notification of comment by rakuco Please view or discuss this issue at https://github.com/w3c/wake-lock/issues/250#issuecomment-581858718 using your GitHub account
Received on Tuesday, 4 February 2020 11:11:34 UTC