Re: [slightlyoff/ServiceWorker] Create a new ReadableStream in FetchEvent.respondWith (#934)

>                          <li>If <var>response</var>'s body is non-null, run these substeps:
>                            <ol>
> -                            <li>Set <var>potentialResponse</var>'s <a>body</a> to <var>response</var>'s <a href="https://fetch.spec.whatwg.org/#concept-body-body">body</a>.</li>
> -                            <li>Let <var>dummyStream</var> be an <a>empty</a> <a>ReadableStream</a> object.</li>
> -                            <li>Set <var>response</var>'s <a href="https://fetch.spec.whatwg.org/#concept-body-body">body</a> to a new <a>body</a> whose <a>stream</a> is <var>dummyStream</var>.</li>
> -                            <li>Let <var>reader</var> be the result of <a lt="get a reader">getting a reader</a> from <var>dummyStream</var>.</li>
> -                            <li><a>Read all bytes</a> from <var>dummyStream</var> with <var>reader</var>.</li>
> +                            <li>Let <var>reader</var> be the result of <a lt="get a reader">getting a reader</a> from <var>response</var>'s <a>body</a>'s <a>stream</a>.</li>
> +                            <li>Let <var>strategy</var> be an object. The user agent may choose any object.</li>
> +                            <li>Let <var>pull</var> be an action that runs these subsubsteps:
> +                              <ol>
> +                                <li>Let <var>promise</var> be the result of <a lt="read a chunk from a reader">reading</a> a chunk from <var>reader</var>.</li>
> +                                <li>When <var>promise</var> is fulfilled with an object whose <code>done</code> property is false and whose <code>value</code> property is a <code>Uint8Array</code> object, append the bytes represented by the <code>value</code> property to <var>bytes</var></li>.

Nit: period before `</li>`, not after

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/pull/934/files/8f5e410f7619eb463ef8f452e3cfad924e436814#r73101434

Received on Tuesday, 2 August 2016 06:41:45 UTC