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

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