summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/streams/underlying_sink_base.idl
blob: 250a8acbaa40349d70fa6dc7aa8abf88595677a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// 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 not a spec interface. Instead, it is used to generate bindings
// so that Blink code which wishes to create a stream can derive from
// UnderlyingSinkBase, and a JavaScript object can then be generated
// automatically for use in initializing a WritableStream.
[
    NoInterfaceObject
]
interface UnderlyingSinkBase {
    [CallWith=ScriptState, RaisesException] Promise<void> start(any controller);
    [CallWith=ScriptState, RaisesException] Promise<void> write(any chunk, any controller);
    [CallWith=ScriptState, RaisesException] Promise<void> close();
    [CallWith=ScriptState, RaisesException] Promise<void> abort(any reason);
};