Package-level declarations

Types

Link copied to clipboard
class Lock

The Lock interface of the Web Locks API provides the name and mode of a lock. Available only in secure contexts.

Link copied to clipboard
typealias LockGrantedCallback<T> = (lock: Lock?) -> T
Link copied to clipboard
interface LockInfo
Link copied to clipboard

The LockManager interface of the Web Locks API provides methods for requesting a new Lock object and querying for an existing Lock object. Available only in secure contexts.

Link copied to clipboard
Link copied to clipboard
sealed interface LockMode
Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
inline suspend fun LockManager.query(): LockManagerSnapshot

The query() method of the LockManager interface returns a Promise that resolves with an object containing information about held and pending locks.

Link copied to clipboard
inline suspend fun <T : JsAny?> LockManager.request(name: String, noinline callback: LockGrantedCallback<T>): T

The request() method of the LockManager interface requests a Lock object with parameters specifying its name and characteristics.

inline suspend fun <T : JsAny?> LockManager.request(name: String, options: LockOptions, noinline callback: LockGrantedCallback<T>): T