summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/streams/writable_stream_default_writer.idl
blob: 68cf0dd6a551de0ad42e6d55819ddc8225a3419c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// 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),
    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);
};