JavaScript HTML Shell
Latest commit 311b52c Feb 17, 2017 @ricea ricea committed on GitHub Execute strategySize first in write() (#680)
A strategy size() function can re-entrantly call controller, writer or writable
methods, leaving the stream in an unexpected state. To ensure predictable
behaviour, call size() before observing or modifying any state.

Previously, if size() threw an exception, writer.write() would reject with that
exception. After this change, it rejects with a TypeError instead.

Also update the web-platform-test to include the new
streams/writable-streams/reentrant-strategy.js tests.

Streams Standard

The streams standard provides APIs for creating, composing, and consuming streams of data. These streams are designed to map efficiently to low-level I/O primitives, and allow easy composition with built-in backpressure and queuing.

The main spec is available at, generated from the file.

Snapshots of any given commit or branch are available at specially-crafted URLs:

Tests and reference implementation

This repository also includes a reference implementation and test suite under reference-implementation/. See the README under that directory for more details. We strive for every commit that changes the spec to also add tests, and to change the reference implementation in order to pass those tests.

Contribution guidelines

For guidelines on how to build and edit the spec and reference implementation, see

Code of conduct

We are committed to providing a friendly, safe and welcoming environment for all. Please read and respect the WHATWG Code of Conduct.