> For the complete documentation index, see [llms.txt](https://pmsgz.gitbook.io/nectar/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pmsgz.gitbook.io/nectar/advanced/web-apis/screen-wake-lock.md).

# Screen Wake Lock API

## Overview

Screen Wake Lock API provides a way to prevent devices from dimming or locking the screen when the app needs to keep running.

## Demo

<https://nectar.website/demo/web-apis/screen-wake-lock/>

## Usage

You can refer to the code present in `/partials/web-apis/screen-wake-lock.html` file and use it accordingly.

## Reference

<https://developer.mozilla.org/en-US/docs/Web/API/Screen_Wake_Lock_API>
