Class Lock
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
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'.
[Value("Lock")]
public class Lock
- Inheritance
-
Lock
- Inherited Members
Remarks
Constructors
Lock()
public Lock()
Properties
Mode
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".
[Value("mode")]
public LockMode Mode { get; }
Property Value
- LockMode
One of
"exclusive"or"shared".
Remarks
Name
The name read-only property of
the Lock interface returns the name passed to
'LockManager.Request' selected when the lock was requested.
[Value("name")]
public string Name { get; }
Property Value
- string
A string.
Remarks
The name of a lock is passed by script when the lock is requested. The name is selected
by the developer to represent an abstract resource for which use is being coordinated
across multiple tabs, workers, or other code within the origin. For example, if only one
tab of a web application should be synchronizing network resources with an offline
database, it could use a lock name such as "net_db_sync".