Skip to content

Commit 9dc2811

Browse files
committed
Make a more explicit call to fetch, including options such as destination and mode.
1 parent 906d80b commit 9dc2811

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

index.bs

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -273,14 +273,13 @@ platform UI or media keys, thereby improving the user experience.
273273
</li>
274274
<li>
275275
If the user agent wants to display an [=MediaMetadata/artwork image=],
276-
it is RECOMMENDED to run the <a>fetch image algorithm</a>.
276+
the user agent MUST run the <a>fetch image algorithm</a>.
277277
</li>
278278
</ol>
279279

280-
The RECOMMENDED <dfn>fetch image algorithm</dfn> is as follows:
280+
The <dfn>fetch image algorithm</dfn> is as follows:
281281

282282
<ol>
283-
<!-- XXX https://www.w3.org/Bugs/Public/show_bug.cgi?id=24055 -->
284283
<li>
285284
If there are other <a>fetch image algorithms</a> running, cancel
286285
existing algorithm execution instances.
@@ -294,18 +293,22 @@ platform UI or media keys, thereby improving the user experience.
294293
<dfn>preferred artwork image</dfn> from <var>metadata</var>'s
295294
{{MediaMetadata/artwork}} of the <a>active media session</a>.
296295
</li>
296+
<li>Let <var>request</var> be a new [=request=] whose [=request/URL=] is the
297+
<a>preferred artwork image</a>'s {{MediaImage/src}}, [=request/destination=]
298+
is "image", [=request/mode=] is "no-cors", [=request/credentials mode=] is "include",
299+
and whose [=request/use-URL-credentials flag=] is set.
300+
</li>
297301
<li>
298-
[=Fetch=] the <a>preferred artwork image</a>'s {{MediaImage/src}}.
299-
300-
Then, <a>in parallel</a>:
301-
302+
[=Fetch=] <var>request</var> with the following steps executed
303+
as the fetch's [=processResponse=] algorithm.
302304
<ol>
303-
<li>
304-
Wait for the [=/response=].
305+
<li>
306+
Let <var>response</var> be the [=response=] given to the fetch's
307+
[=processResponse=] algorithm.
305308
</li>
306309
<li>
307-
If the [=/response=]'s [=response/type=] is
308-
{{ResponseType/"default"}}, attempt to decode the resource as an
310+
If <var>response</var>'s [=response/type=] is not
311+
{{ResponseType/"error"}}, attempt to decode <var>response</var>'s [=body=] as an
309312
image.
310313
</li>
311314
<li>

0 commit comments

Comments
 (0)