Google Chrome May Let Sites Block Your Screen from Powering Down

Google Chrome May Let Sites Block Your Screen from Powering Down


Google Chrome developers have added an intent to experiment with a feature that enables web applications to keep systems awake even in lack of mouse or keyboard activity.


This is to be achieved through the WakeLock API, which allows requesting a wake lock that prevents devices from entering a power-saving state by lowering the screen brightness, turning off the screen, or reduce CPU cycles.


Experimenting with the new feature is intended for Google Chrome 78 through 80 and the code for doing this is already available.


Benefits of Wake Lock


The way a webpage would use this API is to make a request when it is visible to prevent the system from automatically locking or turning off the display. Uses could "override the lock by switching to another tab or manually locking or powering off their display," says Google developer Reilly Grant.


The motivation behind the desire to implement this feature is to enable new experiences that currently need a native app. Some applications that would benefit from keeping the system awake are navigation screens, reading an ebook, following recipes, or tasks that need to finish longer computations.


Another reason is to provide a secure and safe way to achieve the result, as web developers needing this functionality turn to workarounds that may pose a security risk or increase power usage - e.g. embedding a low-key video element that plays in a loop for a defined time.


The WakeLock API specification is currently in an experimental stage and developers implementing it should be ..

Support the originator by clicking the read the rest link below.