navigator.wakeLock is a read-only property that returns a WakeLock object from the Screen Wake Lock API. While a screen wake lock is active, the browser tries to prevent dimming, locking, or a screensaver (MDN).
Read the notes below before you rely on this property. Prefer feature detection when support is limited.
Syntax
Use navigator.wakeLock. Start with this line.
JavaScript
navigator.wakeLock
Call
What it does
navigator.wakeLock
Primary signature.
Built into the browser. Read navigator.wakeLock on Navigator — no import required.
Library declarations
JavaScript
navigator.wakeLock
Parameters
Parameter
Description
request("screen")
Required. Ask for a lock (default type is screen)
WakeLockSentinel
Required. Handle for release / status
Visible document
Required. Hidden tabs cannot hold the lock
Return Value
Return Value
Description
*
The current value of navigator.wakeLock.
JavaScript Examples
Example 1 — Feature-Detect Support
Check for wakeLock and a secure context before requesting.
Keep a reference. You need the sentinel to release later.
Request. Same MDN call as Example 2.
Release.release() ends the lock promptly.
Clear state. Set the variable to null so you do not double-release.
Compatibility
Browser Support
navigator.wakeLock is Baseline Newly available (MDN: since March 2025). It requires a secure context. Older browsers may still lack it — feature-detect and keep a graceful fallback.
✓ Baseline · Newly available (2025)
Navigator.wakeLock
Screen Wake Lock API entry point. Request a screen lock to reduce dimming/locking while a visible page needs to stay on, then release when finished.
ModernBaseline 2025
Google ChromeSupported · modern versions
Full support
Mozilla FirefoxSupported · recent releases
Full support
Apple SafariSupported · recent releases
Full support
Microsoft EdgeSupported · Chromium
Full support
OperaSupported · modern versions
Full support
Internet ExplorerNot available
No support
wakeLockNewly available
Bottom line: Detect navigator.wakeLock, require HTTPS and a visible document, wrap request() in try/catch, and release when the task ends.
Frequently Asked Questions
A WakeLock object for the Screen Wake Lock API. Call wakeLock.request("screen") to get a WakeLockSentinel that helps keep the screen from dimming or locking while your visible page needs to stay on.
No. MDN marks it Baseline Newly available (since March 2025). It is not Deprecated, Experimental, or Non-standard. It does require a secure context (HTTPS / localhost).
Yes. MDN lists it as a secure-context feature (HTTPS or localhost) in supporting browsers.
Common reasons: the document is hidden / not fully active, Permissions Policy blocks screen-wake-lock, low battery / power save, or the platform cannot grant the lock. Wrap request() in try/catch.
The object returned when a lock is granted. Use release() to free it manually, listen for the release event, and check the released property. After release, request a new lock if you still need one.
No. Use wake lock only when it helps usability (recipes, maps, presentations, ebooks). Show UI status and let the user turn it off.