UnderlyingSource.webidl (1001B)
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* This Source Code Form is subject to the terms of the Mozilla Public 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 * 6 * The origin of this IDL file is 7 * https://streams.spec.whatwg.org/#underlying-source-api 8 */ 9 10 [GenerateInit] 11 dictionary UnderlyingSource { 12 UnderlyingSourceStartCallback start; 13 UnderlyingSourcePullCallback pull; 14 UnderlyingSourceCancelCallback cancel; 15 ReadableStreamType type; 16 [EnforceRange] unsigned long long autoAllocateChunkSize; 17 }; 18 19 typedef (ReadableStreamDefaultController or ReadableByteStreamController) ReadableStreamController; 20 21 callback UnderlyingSourceStartCallback = any (ReadableStreamController controller); 22 callback UnderlyingSourcePullCallback = Promise<undefined> (ReadableStreamController controller); 23 callback UnderlyingSourceCancelCallback = Promise<undefined> (optional any reason);