Skip to content

Commit 07ef806

Browse files
authored
Turn Body mixin's MIME type into a getter
Tests: web-platform-tests/wpt#27100. Closes #1135.
1 parent f7a81a0 commit 07ef806

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

fetch.bs

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5587,9 +5587,12 @@ HTML, will likely not be exposed here. Rather, an HTML parser API might accept a
55875587
due course.
55885588
<!-- https://lists.w3.org/Archives/Public/public-whatwg-archive/2014Jun/thread.html#msg72 -->
55895589

5590-
<p>Objects implementing the {{Body}} mixin gain an associated
5591-
<dfn id=concept-body-body for=Body>body</dfn> (null or a <a for=/>body</a>) and
5592-
a <dfn id=concept-body-mime-type for=Body>MIME type</dfn> (failure or a <a for=/>MIME type</a>).
5590+
<p>Objects implementing the {{Body}} mixin need to define an associated
5591+
<dfn id=concept-body-mime-type for=Body>MIME type</dfn> algorithm which takes no arguments and
5592+
returns failure or a <a for=/>MIME type</a>.
5593+
5594+
<p>Objects implementing the {{Body}} mixin have an associated
5595+
<dfn id=concept-body-body for=Body>body</dfn> (null or a <a for=/>body</a>).
55935596

55945597
<p>An object implementing the {{Body}} mixin is said to be
55955598
<dfn export id=concept-body-disturbed for=Body>disturbed</dfn> if its <a for=Body>body</a> is
@@ -5805,6 +5808,10 @@ omitted from <a enum><code>RequestMode</code></a> as it cannot be used nor obser
58055808
<p>A {{Request}} object has an associated <dfn for=Request>signal</dfn> (an {{AbortSignal}} object),
58065809
initially a new {{AbortSignal}} object.
58075810

5811+
<p>A {{Request}} object's <a for=Body>MIME type</a> is to return the result of
5812+
<a for="header list">extracting a MIME type</a> from its <a for=Request>request</a>'s
5813+
<a for=request>header list</a>.
5814+
58085815
<p>A {{Request}} object's <a for=Body>body</a> is its
58095816
<a for=Request>request</a>'s
58105817
<a for=request>body</a>.
@@ -6278,10 +6285,6 @@ constructor steps are:
62786285
<var>inputBody</var>.
62796286

62806287
<li><p>Set <a>this</a>'s <a for=Request>request</a>'s <a for=request>body</a> to <var>body</var>.
6281-
6282-
<li><p>Set <a>this</a>'s <a for=Body>MIME type</a> to the result of
6283-
<a for="header list">extracting a MIME type</a> from <a>this</a>'s <a for=Request>request</a>'s
6284-
<a for=request>header list</a>.
62856288
</ol>
62866289

62876290
<p>The <dfn attribute for=Request><code>method</code></dfn> getter steps are to return <a>this</a>'s
@@ -6414,6 +6417,10 @@ enum ResponseType { "basic", "cors", "default", "error", "opaque", "opaqueredire
64146417
<p>A {{Response}} object also has an associated <dfn for=Response export>headers</dfn> (null or a
64156418
{{Headers}} object), initially null.
64166419

6420+
<p>A {{Response}} object's <a for=Body>MIME type</a> is to return the result of
6421+
<a for="header list">extracting a MIME type</a> from its <a for=Response>response</a>'s
6422+
<a for=response>header list</a>.
6423+
64176424
<p>A {{Response}} object's <a for=Body>body</a> is its
64186425
<a for=Response>response</a>'s <a for=response>body</a>.
64196426

@@ -6466,10 +6473,6 @@ constructor steps are:
64666473
`<code>Content-Type</code>`/<var>Content-Type</var> to <a>this</a>'s
64676474
<a for=Response>response</a>'s <a for=response>header list</a>.
64686475
</ol>
6469-
6470-
<li><p>Set <a>this</a>'s <a for=Body>MIME type</a> to the result of
6471-
<a for="header list">extracting a MIME type</a> from <a>this</a>'s <a for=Response>response</a>'s
6472-
<a for=response>header list</a>.
64736476
</ol>
64746477

64756478
<p>The static <dfn method for=Response><code>error()</code></dfn> method steps are:

0 commit comments

Comments
 (0)