Re: [fetch] Introduce Response.body. (#118) (#128)

> + <span title=concept-Response-locked>locked</span>, return a new promise rejected with a
> + <code>TypeError</code>.
> +
> + <li><p>Let <var title>stream</var> be <span title=concept-Response-readable-stream>readable
> + stream</span>.
> +
> + <li><p>If <var title>stream</var> is null, set <var title>stream</var> to an
> + <span title=concept-empty-ReadableStream>empty ReadableStream</span>.
> +
> + <li><p>Let <var title>reader</var> be the result of <span title=concept-get-reader>getting</span>
> + a reader from <var title>stream</var>. If that threw an exception, return a new promise rejected
> + with that exception.
> +
> + <li><p>Let <var title>p</var> be a new promise.
> +
> + <li><p>Let <var title>promise</var> be the result of

I think this section would be clearer if instead of p and promise, you just said "Let promise be the result of reading all bytes from stream with reader. Return the result of transforming promise by a fulfillment handler that ...". It translates more naturally to idiomatic promise code that way too.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/128/files#r39829153

Received on Friday, 18 September 2015 07:09:39 UTC