← Back to release summary

Web Locks API

Category
Miscellaneous
Type
New or changed feature
Status
Enabled by default (Chrome 69)
Intent stage
None

Summary

This API allows scripts running in one tab to asynchronously acquire a lock, hold it while work is performed, then release it. While held, no other script in the origin can acquire the same lock. A lock represents some potentially shared resource, identified by a name chosen by the web app. For example, if a web app running in multiple tabs wants to ensure that only one tab is syncing to the network, each tab could try to acquire a "my_net_sync" lock, but only one tab will succeed.

Standards & signals

View on chromestatus.com