Lock

open class Lock(source)

The Lock interface of the Web Locks API provides the name and mode of a lock. This may be a newly requested lock that is received in the callback to LockManager.request(), or a record of an active or queued lock returned by LockManager.query(). Available only in secure contexts.

MDN Reference

Properties

Link copied to clipboard

The mode read-only property of the Lock interface returns the access mode passed to LockManager.request() when the lock was requested. The mode is either "exclusive" (the default) or "shared".

Link copied to clipboard

The name read-only property of the Lock interface returns the name passed to LockManager.request selected when the lock was requested.