blob: 5fb3288dae2fb5b885e5dc18840974553674e3d9 [file] [log] [blame]
// 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.
// https://streams.spec.whatwg.org/#default-reader-class-definition
[
Exposed=(Window,Worker,Worklet),
ImplementedAs=ReadableStreamReader
] interface ReadableStreamDefaultReader {
[CallWith=ScriptState, RaisesException] constructor(ReadableStream stream);
[CallWith=ScriptState, NotEnumerable] readonly attribute Promise<void>
closed;
[CallWith=ScriptState, RaisesException, NotEnumerable] Promise<void> cancel(
optional any reason);
[CallWith=ScriptState, RaisesException, NotEnumerable] Promise<void> read();
[CallWith=ScriptState, NotEnumerable, RaisesException] void releaseLock();
};