www/lib/web-streams-polyfill/dist/ponyfill.js
// Abstract operations for the WritableStreamDefaultController.
Abstract operations for the WritableStreamDefaultController.
Abstract operations for the WritableStreamDefaultController .
function WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller) {
        var stream = controller._controlledWritableStream;
        if (controller._started === false) {
            return;
        }
        if (stream._inFlightWriteRequest !== undefined) {
            return;
        }
        var state = stream._state;
        if (state === 'erroring') {
            WritableStreamFinishErroring(stream);
            return;
        }
        if (controller._queue.length === 0) {
            return;
        }
        var writeRecord = PeekQueueValue(controller);
        if (writeRecord === 'close') {
            WritableStreamDefaultControllerProcessClose(controller);
        }
        else {
            WritableStreamDefaultControllerProcessWrite(controller, writeRecord.chunk);
        }
    }
function WritableStreamDefaultControllerAdvanceQueueIfNeeded ( controller ) { var stream = controller . _controlledWritableStream ; if ( controller . _started === false ) { return ; } if ( stream . _inFlightWriteRequest !== undefined ) { return ; } var state = stream . _state ; if ( state === 'erroring' ) { WritableStreamFinishErroring ( stream ) ; return ; } if ( controller . _queue . length === 0 ) { return ; } var writeRecord = PeekQueueValue ( controller ) ; if ( writeRecord === 'close' ) { WritableStreamDefaultControllerProcessClose ( controller ) ; } else { WritableStreamDefaultControllerProcessWrite ( controller , writeRecord . chunk ) ; } }
Abstract operations for the WritableStreamDefaultController.
Abstract operations for the WritableStreamDefaultController .