Re: [whatwg/fetch] Return a "controller" instance from fetch (#1329)

@annevk commented on this pull request.

This good, thanks for working on this! I suggest we wait a bit with landing this until @jakearchibald is back home (next week iirc) as he worked on this last and might have some relevant insights.

> + <dt><dfn for="fetch params">terminated flag</dfn>
+ <dt><dfn for="fetch params">aborted flag</dfn>
+ <dd>A flag, initially unset.

Let's make these booleans. And perhaps it ought to be a single enum with three values?

> + <p>If this instance of <a for=/>fetch</a> is
+ <dfn export for=fetch id=concept-fetch-terminate>terminated</dfn> given flag <var>aborted</var>,
+ which is unset unless otherwise specified, <a for="fetch controller">terminate</a>
+ <var>controller</var> with <var>aborted</var>.

We no longer need to say this, right? The idea is that instead you would terminate the controller?

> +<p>To create the <dfn>appropriate network error</dfn> given <a for=/>fetch params</a>
+<var>fetchParams</var>, return an <a>aborted network error</a> if <var>fetchParams</var>'s
+<a for="fetch params">aborted flag</a> is set, otherwise return a <a>network error</a>.

I like this! Simplifies things a bunch.

Minor nit: use a semicolon before otherwise.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1329#pullrequestreview-785680142

Received on Thursday, 21 October 2021 13:23:32 UTC