blob: 0bed52d63e6fe9b2f1042686d33d9808c62de7e9 [file] [log] [blame]
// Copyright 2019 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.
// This is only used when the new C++ implementation is enabled.
// https://streams.spec.whatwg.org/#default-writer-class-definition
[
Exposed=(Window,Worker,Worklet),
RuntimeEnabled=StreamsNative,
RaisesException=Constructor,
ConstructorCallWith=ScriptState,
Constructor(WritableStream stream)
] interface WritableStreamDefaultWriter {
[CallWith=ScriptState, NotEnumerable] readonly attribute Promise<void>
closed;
[RaisesException, CallWith=ScriptState, NotEnumerable] readonly attribute
any desiredSize;
[CallWith=ScriptState, NotEnumerable] readonly attribute Promise<void>
ready;
[CallWith=ScriptState, NotEnumerable] Promise<void> abort(
optional any reason);
[CallWith=ScriptState, NotEnumerable] Promise<void> close();
[CallWith=ScriptState, NotEnumerable] void releaseLock();
[CallWith=ScriptState, NotEnumerable] Promise<void> write(
optional any chunk);
};