Re: [wake-lock] Subtleties of using Document are not specced (#141)

I was discussing this with @kenchris offline. Using a "visibility" definition from Page Visibility, this summarizes our discussion:

- If a page is [`visible`](https://w3c.github.io/page-visibility/#dom-visibilitystate-visible), then the `"screen"` lock should remain, and the `"system"` lock, too. 
- If a page is [`hidden`](https://w3c.github.io/page-visibility/#dom-visibilitystate-hidden), then the `"screen"` lock should be released, but the`"system"` lock should remain.
- If a page becomes [`visible`](https://w3c.github.io/page-visibility/#dom-visibilitystate-visible) again, it's the page's responsibility to re-establish a `"screen"` lock if it's still needed.

Does this sound reasonable to others?

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

Received on Thursday, 7 March 2019 11:10:41 UTC