blob: 9ef222799299ecb56535e938883893d3c8eeca0d [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://wicg.github.io/web-locks/#callbackdef-lockgrantedcallback
callback LockGrantedCallback = any (Lock? lock);
// https://wicg.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();
};