blob: dfa15d193b9b1b8e6dd77a528ee8e2624d2f03bf [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<LockState> query();
};