blob: 552964907603800f3b7dfb91e77055cd14b30515 [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/#rs-class
[
Exposed=(Window,Worker),
Constructor(optional any underlyingSource, optional any strategy),
RaisesException=Constructor,
ConstructorCallWith=ScriptState
] interface ReadableStream {
// As long as we use V8Extras, anything can raise an exception.
[RaisesException, CallWith=ScriptState, NotEnumerable] readonly attribute boolean locked;
// TODO(yhirano): function length is different from what's specced. Fix it.
[RaisesException, CallWith=ScriptState, NotEnumerable] Promise<any> cancel(
optional any reason);
[RaisesException, CallWith=ScriptState, NotEnumerable] any getReader(optional any mode);
[RaisesException, CallWith=ScriptState, NotEnumerable] any pipeThrough(
any transformStream, optional any options);
[RaisesException, CallWith=ScriptState, NotEnumerable] Promise<any> pipeTo(
any destination, optional any option);
[RaisesException, CallWith=ScriptState, NotEnumerable] any tee();
};