blob: 32593ecf4b84e8b81ec63f5acffa706e0da31486 [file] [log] [blame]
// Copyright 2018 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://streams.spec.whatwg.org/#ws-class
[
Exposed=(Window,Worker,Worklet),
// TODO(yhirano): Remove CustomConstructor. See https://crbug.com/906476.
CustomConstructor(optional any underlyingSink, optional any strategy),
RaisesException=Constructor,
ConstructorCallWith=ScriptState
] interface WritableStream {
// As long as we use V8Extras, anything can raise an exception.
[RaisesException, CallWith=ScriptState, NotEnumerable] readonly attribute boolean locked;
[RaisesException, CallWith=ScriptState, NotEnumerable] Promise<void> abort(
optional any reason);
[RaisesException, CallWith=ScriptState, NotEnumerable] any getWriter();
};