-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or request
Description
When somebody thinks for a while, it can happen that screen turns off. It would be nice if screen was still on. There's an api for that: https://developer.mozilla.org/en-US/docs/Web/API/Screen_Wake_Lock_API
So something like:
navigator.wakeLock?.request("screen").then(() => {
document.addEventListener("visibilitychange", () => {
if (document.visibilityState === "visible") {
navigator.wakeLock.request("screen");
}
});
})should do the trick.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request