← Back to release summary

Streams API: WritableStream close()

Category
JavaScript
Type
New or changed feature
Status
Enabled by default (Chrome 81)
Intent stage
Prepare to ship

Summary

Add a close() method to WritableStream objects. This permits closing the stream if it is unlocked. It is directly equivalent to getting a writer, using the writer to close the stream, and then unlocking it again.

Standards & signals

Explainers: https://github.com/whatwg/streams/issues/1007

View on chromestatus.com