1/* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/.
5 * You can obtain one at http://mozilla.org/MPL/2.0/.
6 *
7 * Source: https://streams.spec.whatwg.org/#readablestreamdefaultreader
8 */
9
10[Exposed=(Window,Worker,Worklet)]
11interface ReadableStreamBYOBReader {
12  constructor(ReadableStream stream);
13
14  Promise<ReadableStreamBYOBReadResult> read(ArrayBufferView view);
15  undefined releaseLock();
16};
17ReadableStreamBYOBReader includes ReadableStreamGenericReader;
18
19dictionary ReadableStreamBYOBReadResult {
20 ArrayBufferView value;
21 boolean done;
22};
23