Skip to content

Commit

Permalink
Add an intro for some abstract ops sections
Browse files Browse the repository at this point in the history
  • Loading branch information
domenic committed Mar 3, 2016
1 parent a465cf4 commit 8a8ba18
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,9 @@ href="https://github.com/whatwg/streams/issues/97">#97</a> for more information.

<h3 id="rs-abstract-ops">General Readable Stream Abstract Operations</h3>

The following abstract operations, unlike most in this specification, are meant to be generally useful by other
specifications, instead of just being part of the implementation of this spec's classes.

<h4 id="acquire-readable-stream-byob-reader" aoid="AcquireReadableStreamBYOBReader" throws>AcquireReadableStreamBYOBReader ( stream )</h4>

This abstract operation is meant to be called from other specifications that may wish to acquire a <a>BYOB reader</a>
Expand Down Expand Up @@ -799,6 +802,17 @@ called with argument <var>reason</var>, it performs the following steps:

<h3 id="rs-abstract-ops">Readable Stream Abstract Operations Used by Controllers</h3>

In terms of specification factoring, the way that the <code>ReadableStream</code> class encapsulates the behavior of
both simple readable streams and <a>readable byte streams</a> into a single class is by centralizing most of the
potentially-varying logic inside the two controller classes, <code>ReadableStreamDefaultController</code> and
<code>ReadableStreamBYOBController</code>. Those classes define most of the stateful internal slots and abstract
operations for how a stream's <a>internal queue</a> is managed and how it interfaces with its <a>underlying source</a>
or <a>underlying byte source</a>.

The abstract operations in this section are interfaces that are used by the controller implementations to affect their
associated <code>ReadableStream</code> object, translating those internal state changes into developer-facing results
visible through the <code>ReadableStream</code>'s public API.

<h4 id="readable-stream-add-read-request" aoid="ReadableStreamAddReadRequest" nothrow>ReadableStreamAddReadRequest ( stream )</h4>

<emu-alg>
Expand Down

0 comments on commit 8a8ba18

Please sign in to comment.