The Web Locks API allows scripts running in one tab or worker to asynchronously acquire, hold, and release a lock to coordinate resource usage across multiple tabs or workers within the same origin. It supports both shared and exclusive lock modes and includes features for conditional acquisition and deadlock prevention. Locks are scoped to their origins, ensuring only tasks from the same origin are affected. It provides a way to inspect lock states for debugging purposes.

6m read timeFrom developer.mozilla.org
Post cover image

Sort: