Re: [wake-lock] Anyone implementing "system" lock? (#232)

>My suggestion from TPAC was that for the data processing worker case using the system wake lock API should cause the user agent to display a notification indicating that there is work in progress. The API should provide the script the ability to indicate the progress of that work so that it can be reflected in the UI.

I wonder if we need the API tho... consider: when  a script on the main thread is taking too long we show the "script is taking too long" alert. I wonder if we could do the same with a dedicated worker? If the user says "yeah, OK! let it work", the UA could automatically manage the system lock without any developer intervention. 


@kenchris wrote:
> Android 10 does that with geolocation in the background and offers the following options:

I think that's a different use case to this. Allowing Geolocation "all the time" I don't think means "keep a worker alive"? Doesn't it mean more, "periodically wake up when there is a significant location change so I can do a little related work". 


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

Received on Wednesday, 9 October 2019 04:42:48 UTC