blob: 28072322bc3d7d281975692af391f8a2792d38c9 [file] [log] [blame]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// https://w3c.github.io/web-locks/#callbackdef-lockgrantedcallback
callback LockGrantedCallback = any (Lock? lock);
// https://w3c.github.io/web-locks/#lockmanager
[
SecureContext,
Exposed=(Window,Worker)
] interface LockManager {
[CallWith=ScriptState, RaisesException, Measure] Promise<Lock> request(
DOMString name,
LockGrantedCallback callback);
[CallWith=ScriptState, RaisesException, Measure] Promise<Lock> request(
DOMString name,
LockOptions options,
LockGrantedCallback callback);
[CallWith=ScriptState, RaisesException, Measure] Promise<LockManagerSnapshot> query();
};