The steps for fetching an image resource are
given by the following algorithm. The algorithm takes an [=image
- resource=] |image|, and an optional [=Request=] |request|. It returns a
+ resource=] |image|, an optional [=Request=] |request|, and an optional
+ [=request/Mode=] |mode| (default "`cors`"). It returns a
[=Response=].
+
[=Assert=]: |mode| is "`cors`" or "`same-origin`".
+
If |request| is `undefined`:
Set |request| to a new [=Request=].
@@ -371,14 +374,18 @@
-
If |request|'s [=request/Client=] is null, throw a {{TypeError}}.
+
[=Assert=]: |request|'s [=request/Client=] is not null.
+
+
Set |request|'s [=request/Mode=] to |mode|.
Perform a [=fetch=] using |request| and return the [=Response=].