| // 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) |
| ] interface WritableStreamDefaultWriter { |
| [CallWith=ScriptState, RaisesException] constructor(WritableStream stream); |
| [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, RaisesException, NotEnumerable] Promise<void> abort( |
| optional any reason); |
| [CallWith=ScriptState, RaisesException, NotEnumerable] Promise<void> close(); |
| [CallWith=ScriptState, NotEnumerable] void releaseLock(); |
| [CallWith=ScriptState, RaisesException, NotEnumerable] Promise<void> write( |
| optional any chunk); |
| }; |