Skip to content

Commit 9165d9b

Browse files
committed
Legacy warning
1 parent 222e8cf commit 9165d9b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

fetch.bs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6404,9 +6404,13 @@ constructor steps are:
64046404

64056405
<li><p>Empty <a>this</a>'s <a for=Request>headers</a>'s <a for=Headers>header list</a>.
64066406

6407-
<li><p>If <a>this</a>'s <a for=Request>request</a>'s <a for=request>mode</a> is
6408-
"<code>no-cors</code>" and <a>this</a>'s <a for=Request>request</a>'s <a for=request>method</a>
6409-
is not a <a>CORS-safelisted method</a>, then <a>throw</a> a {{TypeError}}.
6407+
<li>
6408+
<p>If <a>this</a>'s <a for=Request>request</a>'s <a for=request>mode</a> is
6409+
"<code>no-cors</code>" and <a>this</a>'s <a for=Request>request</a>'s <a for=request>method</a>
6410+
is not a <a>CORS-safelisted method</a>, then <a>throw</a> a {{TypeError}}.
6411+
6412+
<p class=note>If <var>init</var> <a for=map>is empty</a> and <var>input</var> is a {{Request}}, the <a for=request>mode</a> and <a for=request>method</a> will be copied without the above check. This is considered legacy. Modern APIs should instead use a request with a <a for=request>mode</a> of "<code>cors</code>" if they want to use a <a for=request>method</a> that is not a <a>CORS-safelisted method</a>.
6413+
</li>
64106414

64116415
<li><p>If <var>headers</var> is a <code>Headers</code> object, then <a for=list>for each</a>
64126416
<var>header</var> in its <a for=Headers>header list</a>, <a for=Headers>append</a>

0 commit comments

Comments
 (0)