MDN Web Docs

Syntax

js

releaseLock()

Parameters

None.

Return value

None (undefined).

Exceptions

TypeError

Thrown if the source object is not a ReadableStreamBYOBReader.

Examples

A trivial examples is shown below. A lock is created as soon as the reader is created on the stream.

js

const reader = stream.getReader({ mode: "byob" });
reader.releaseLock();

Specifications

Specification
Streams
# ref-for-byob-reader-release-lock②

Browser compatibility

See also

Help improve MDN

Yes No

Learn how to contribute

This page was last modified on by MDN contributors.

Read the original on developer.mozilla.org ↗