Advertisement
Workers & Background
Web Locks API Demonstration
Coordinate resource locks across multiple tabs and workers.
Checking support...
Feature Not SupportedThis browser does not support the Web Locks API Web API feature. Try testing in a modern browser (such as Chrome, Edge, Safari, or Firefox).
Advertisement
Interactive Input Workspace
Ready for input
Web API Execution Output
Result output will be displayed here after execution...
Native JavaScript Code Example (Zero Libraries)
await navigator.locks.request('my_resource', async (lock) => {
// Held lock
});About the Web Locks API Web API
Web Locks API allows scripts running in one tab to asynchronously acquire a lock.
Specification:W3C & WHATWG Web API Standard
Sponsored Content