LocksBaseline · Widely available
The navigator.locks API coordinates work with shared resources through mutually exclusive ownership of a resource's name. Also known as web locks.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Mar 14, 2022. Widely available since Sep 14, 2024.
Browser support
DesktopChrome
1–68Not supported
69+Supportedsince Sep 4, 2018
Current: 155Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154Firefox
1–95Not supported
96+Supportedsince Jan 11, 2022
Current: 157Safari
1–15.3Not supported
15.4+Supportedsince Mar 14, 2022
Current: 27MobileChrome Android
18–68Not supported
69+Supportedsince Sep 4, 2018
Current: 155Firefox Android
4–95Not supported
96+Supportedsince Jan 11, 2022
Current: 157Safari iOS
1–15.3Not supported
15.4+Supportedsince Mar 14, 2022
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: Lock.
Feature detection
JS · check before using
if ("Lock" in globalThis) {
// Lock is available
} else {
// load a polyfill or use a fallback
}Specification
Sub-features
Support for each part of the feature (8). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| Lock | 69 | 79 | 96 | 15.4 | 69 | 96 | 15.4 |
| Lock.mode | 69 | 79 | 96 | 15.4 | 69 | 96 | 15.4 |
| Lock.name | 69 | 79 | 96 | 15.4 | 69 | 96 | 15.4 |
| LockManager | 69 | 79 | 96 | 15.4 | 69 | 96 | 15.4 |
| LockManager.query | 69 | 79 | 96 | 15.4 | 69 | 96 | 15.4 |
| LockManager.request | 69 | 79 | 96 | 15.4 | 69 | 96 | 15.4 |
| Navigator.locks | 69 | 79 | 96 | 15.4 | 69 | 96 | 15.4 |
| WorkerNavigator.locks | 69 | 79 | 96 | 15.4 | 69 | 96 | 15.4 |