Re: [whatwg/fetch] Editorial: clarify how to get MIME type for request and response (PR #1657)

@annevk commented on this pull request.

Great, only nits remain. \o/

You don't have to squash as I'll do that through the GitHub UI. If you could work out a tentative commit message that would help though.

And perhaps we should no longer mark this as Editorial as you've fixed a null-pointer dereference.

> @@ -7178,6 +7174,26 @@ returns failure or a <a for=/>MIME type</a>.
 
 <hr>
 
+<div algorithm>
+<p>To <dfn id=concept-body-get-mime-type for=Body>get the MIME type</dfn>, given a {{Request}}
+or {{Response}} object, <var>requestOrResponse</var>, run these steps:

```suggestion
or {{Response}} object <var>requestOrResponse</var>:
```
(no need for a comma before the variable name and no need for "run these steps" when we start with "To")

>  
- <dt>Otherwise
- <dd><p><a>Throw</a> a {{TypeError}}.
-</dl>
+     <li><p>If <var>entries</var> is failure, then <a>throw</a> a {{TypeError}}.
+
+     <li><p>Return a new {{FormData}} object whose <a for=FormData>entry list</a> is
+     <var>entries</var>.
+    </ol>
+ </dl>
+ <li><p>Otherwise, <a>Throw</a> a {{TypeError}}.

No need or "Otherwise, ".

> + <li><p>If <var>mimeType</var> is non-null, then switch on <var>mimeType</var>'s
+ <a for="MIME type">essence</a> and run the corresponding steps:

Since this `<li>` contains both the `<p>` and the `<dl>`, the `<p>` needs to be on a newline and indented once. The `<dl>` needs to be indented one more as well therefore.

Wording-wise this looks great though!

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

Message ID: <whatwg/fetch/pull/1657/review/1453115922@github.com>

Received on Wednesday, 31 May 2023 12:52:29 UTC