Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ReadableStreamOperations for ServiceWorker #350

Merged
merged 1 commit into from
Aug 10, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion Overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<p><a class="logo" href="https://whatwg.org/"><img alt="WHATWG" height="100" src="https://resources.whatwg.org/logo-fetch.svg" width="100"></a>
<h1 id="cors">Fetch</h1>
<h2 class="no-num no-toc" id="living-standard-—-last-updated-9-august-2016">Living Standard — Last Updated 9 August 2016</h2>
<h2 class="no-num no-toc" id="living-standard-—-last-updated-10-august-2016">Living Standard — Last Updated 10 August 2016</h2>

<dl>
<dt>Participate:
Expand Down Expand Up @@ -1667,6 +1667,11 @@ <h4 id="readablestream"><span class="secno">3.9.1 </span>ReadableStream</h4>
<li><p>Return <var>reader</var>.
</ol>

<p>To <dfn id="concept-read-chunk-from-readablestream" title="concept-read-chunk-from-ReadableStream">read a chunk</dfn> from a
<a href="#concept-readablestream"><code title="concept-ReadableStream">ReadableStream</code></a> object with <var>reader</var>, return the
result of calling
<a href="https://streams.spec.whatwg.org/#read-from-readable-stream-reader"><code class="external" data-anolis-spec="streams">ReadFromReadableStreamReader</code></a>(<var>reader</var>).

<p>To <dfn id="concept-read-all-bytes-from-readablestream" title="concept-read-all-bytes-from-ReadableStream">read all bytes</dfn> from a
<a href="#concept-readablestream"><code title="concept-ReadableStream">ReadableStream</code></a> object with <var>reader</var>, run these
steps:
Expand Down Expand Up @@ -1699,6 +1704,12 @@ <h4 id="readablestream"><span class="secno">3.9.1 </span>ReadableStream</h4>
<li><p>Return <var>promise</var>.
</ol>

<p>To <dfn id="concept-cancel-readablestream" title="concept-cancel-ReadableStream">cancel</dfn> a
<a href="#concept-readablestream"><code title="concept-ReadableStream">ReadableStream</code></a> object with <var>reader</var> and
<var>reason</var>, return the result of calling
<a href="https://streams.spec.whatwg.org/#readable-stream-reader-cancel"><code class="external" data-anolis-spec="streams">ReadableStreamReaderGenericCancel</code></a>(<var>reader</var>,
<var>reason</var>).

<p class="note no-backref">Because the reader grants exclusive access, the actual mechanism of how
to read cannot be observed. Implementations could use more direct mechanism if convenient.

Expand Down
11 changes: 11 additions & 0 deletions Overview.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -1595,6 +1595,11 @@ <h4>ReadableStream</h4>
<li><p>Return <var>reader</var>.
</ol>

<p>To <dfn title=concept-read-chunk-from-ReadableStream>read a chunk</dfn> from a
<code title=concept-ReadableStream>ReadableStream</code> object with <var>reader</var>, return the
result of calling
<code data-anolis-spec=streams>ReadFromReadableStreamReader</code>(<var>reader</var>).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, maybe we should not use <code> here? I don't think we do that in HTML.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<span> seems better for abstract operations.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, that should be fixed separately with other abstract operations, I think.


<p>To <dfn title=concept-read-all-bytes-from-ReadableStream>read all bytes</dfn> from a
<code title=concept-ReadableStream>ReadableStream</code> object with <var>reader</var>, run these
steps:
Expand Down Expand Up @@ -1627,6 +1632,12 @@ <h4>ReadableStream</h4>
<li><p>Return <var>promise</var>.
</ol>

<p>To <dfn title=concept-cancel-ReadableStream>cancel</dfn> a
<code title=concept-ReadableStream>ReadableStream</code> object with <var>reader</var> and
<var>reason</var>, return the result of calling
<code data-anolis-spec=streams>ReadableStreamReaderGenericCancel</code>(<var>reader</var>,
<var>reason</var>).

<p class="note no-backref">Because the reader grants exclusive access, the actual mechanism of how
to read cannot be observed. Implementations could use more direct mechanism if convenient.

Expand Down