- From: Reilly Grant via GitHub <sysbot+gh@w3.org>
- Date: Tue, 25 Feb 2020 20:09:37 +0000
- To: public-device-apis-log@w3.org
> > 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. I think that it is useful for the platform to provide a way for script to hint that it would like to perform a long running computation in order to inform how the UA presents that message to the user. Calling this API beforehand would allow the UA to tell the difference between long running script that is a bug and long running scripts that are intentional. This would allow it to implement mitigations, for example against draining the user's battery, without breaking sites. -- GitHub Notification of comment by reillyeon Please view or discuss this issue at https://github.com/w3c/wake-lock/issues/232#issuecomment-591044975 using your GitHub account
Received on Tuesday, 25 February 2020 20:09:38 UTC