blob: bb61c208a70f78d0bec7eacc054feb18ebfd312b [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)
] interface WritableStream {
[CallWith=ScriptState, RaisesException, MeasureAs=WritableStreamConstructor] constructor(optional any underlyingSink, optional any strategy);
readonly attribute boolean locked;
[RaisesException, CallWith=ScriptState] Promise<void> abort(
optional any reason);
[RaisesException, CallWith=ScriptState] Promise<void> close();
[RaisesException, CallWith=ScriptState] WritableStreamDefaultWriter getWriter();
};