W3C home > Mailing lists > Public > public-device-apis-log@w3.org > January 2020

Re: [wake-lock] Navigation and maintaining locks (#249)

From: Reilly Grant via GitHub <sysbot+gh@w3.org>
Date: Wed, 29 Jan 2020 20:09:35 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-579937214-1580328574-sysbot+gh@w3.org>
I imagine the mechanism for this would be to make a `WakeLockSentinel` transferrable. I don't believe there is currently a way to include transferables in a navigation but there is in the [Portals API](https://wicg.github.io/portals/). Transferring a `WakeLockSentinel` to a different browsing context would move the wake lock's state record into the receiving document.

I prefer this over a mechanism which implicitly passes a wake lock across same-origin navigations as it makes the default behavior safe in terms of not enabling a page to retain a lock inadvertently.

The Portals API provides infrastructure for fixing a number of cross-navigation continuity issues and seems like a better solution than building something one-off for this API.

-- 
GitHub Notification of comment by reillyeon
Please view or discuss this issue at https://github.com/w3c/wake-lock/issues/249#issuecomment-579937214 using your GitHub account
Received on Wednesday, 29 January 2020 20:09:37 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 29 January 2020 20:09:38 UTC