Re: [screen-wake-lock] Be able to query if there are any screen wake-lock object active for the current page (#273)

There was a long conversation about this on #199 when we were dealing with a bunch of other API design issues. I want to make sure I completely understand the use case for this. Couldn't the bookmarklet store the WakeLockSentinel in a well-known property on the Window or Document so that it remains stateless? Is the desire to release a wake lock held by other script in the page?

@jakearchibald mentioned that Web Locks have a [query()](https://wicg.github.io/web-locks/#api-lock-manager-query) method which allows you to detect acquired locks but not release them. Would that be sufficient for what you are trying to do?

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 17 August 2020 16:42:41 UTC