Share via


cancel method

The cancel method signals that the reader no longer has need of the stream, thus throwing away any queued data.

Syntax

var retval = ReadableStream.cancel();

Parameters

This method has no parameters.

Return value

Type: Promise<void>

A rejected promise.

Standards information

Remarks

Readable streams cannot be cancelled while locked to a reader.

See also

ReadableStream