- From: Anne van Kesteren <notifications@github.com>
- Date: Tue, 18 Nov 2025 04:21:10 -0800
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/fetch/pull/1879/review/3477493060@github.com>
@annevk commented on this pull request.
> @@ -5363,14 +5363,41 @@ returning a response directly, or allowing the request to proceed by returning n
<li><p>Let <var>isTopLevelNavigation</var> be true if <var>request</var>'s
<a for=request>destination</a> is "<code>document</code>"; otherwise, false.
- <li><p>If <var>isTopLevelNavigation</var> is false and <var>requestEnvironment</var> is null,
- then return a <a>network error</a>.
+ <li><p>Let <var>isTopLevelSelfFetch</var> be false.
+
+ <li><p>If <var>request</var>'s <a for=request>client</a> is non-null:
```suggestion
<li>
<p>If <var>request</var>'s <a for=request>client</a> is non-null:
```
> @@ -5363,14 +5363,41 @@ returning a response directly, or allowing the request to proceed by returning n
<li><p>Let <var>isTopLevelNavigation</var> be true if <var>request</var>'s
<a for=request>destination</a> is "<code>document</code>"; otherwise, false.
- <li><p>If <var>isTopLevelNavigation</var> is false and <var>requestEnvironment</var> is null,
- then return a <a>network error</a>.
+ <li><p>Let <var>isTopLevelSelfFetch</var> be false.
+
+ <li><p>If <var>request</var>'s <a for=request>client</a> is non-null:
+ <ol>
+ <li><p>Let <var>global</var> be <var>request</var>'s <a for=request>client</a>'s
+ <a for="environment settings object">global object</a>.
+
+ <li>
+ <p>If all of the following conditions are true:
+
+ <ul class=brief>
The `<ul>` should not be further indented. It becomes a sibling of the `<p>` after all.
> - <li><p>If <var>isTopLevelNavigation</var> is false and <var>requestEnvironment</var> is null,
- then return a <a>network error</a>.
+ <li><p>Let <var>isTopLevelSelfFetch</var> be false.
+
+ <li><p>If <var>request</var>'s <a for=request>client</a> is non-null:
+ <ol>
+ <li><p>Let <var>global</var> be <var>request</var>'s <a for=request>client</a>'s
+ <a for="environment settings object">global object</a>.
+
+ <li>
+ <p>If all of the following conditions are true:
+
+ <ul class=brief>
+ <li><p><var>global</var> is a {{Window}} object;
+
+ <li><p><var>global</var>'s <a for=Window>navigable</a> is not null;
I wonder if there are cases where this would be null and you can get this far into a fetch. Hmm.
>
- <li><p>Let <var>navigationOrEnvironment</var> be the string "<code>navigation</code>" if
- <var>isTopLevelNavigation</var> is true; otherwise, <var>requestEnvironment</var>.
+ <li><p><var>global</var>'s <a for=Window>navigable</a>'s <a for=navigable>parent</a>
+ is null; and
+
+ <li><p><var>requestEnvironment</var>'s <a for="environment">creation URL</a>
+ <a for=url>equals</a> <var>request</var>'s <a for=request>current URL</a>,
+ </ul>
+
+ <p>then set <var>isTopLevelSelfFetch</var> to false.
to true, surely?
>
- <li><p>Let <var>navigationOrEnvironment</var> be the string "<code>navigation</code>" if
- <var>isTopLevelNavigation</var> is true; otherwise, <var>requestEnvironment</var>.
+ <li><p><var>global</var>'s <a for=Window>navigable</a>'s <a for=navigable>parent</a>
+ is null; and
+
+ <li><p><var>requestEnvironment</var>'s <a for="environment">creation URL</a>
+ <a for=url>equals</a> <var>request</var>'s <a for=request>current URL</a>,
+ </ul>
+
+ <p>then set <var>isTopLevelSelfFetch</var> to false.
+
+ <li><p>Let <var>stringOrEnvironment</var> be <var>requestEnvironment</var>.
+
+ <li><p>If <var>isTopLevelNavigation</var> is true, then set <var>stringOrEnvironment</var>
+ to the string "<code>navigation</code>".
```suggestion
to "<code>navigation</code>".
```
> + <li><p><var>global</var>'s <a for=Window>navigable</a>'s <a for=navigable>parent</a>
+ is null; and
+
+ <li><p><var>requestEnvironment</var>'s <a for="environment">creation URL</a>
+ <a for=url>equals</a> <var>request</var>'s <a for=request>current URL</a>,
+ </ul>
+
+ <p>then set <var>isTopLevelSelfFetch</var> to false.
+
+ <li><p>Let <var>stringOrEnvironment</var> be <var>requestEnvironment</var>.
+
+ <li><p>If <var>isTopLevelNavigation</var> is true, then set <var>stringOrEnvironment</var>
+ to the string "<code>navigation</code>".
+
+ <li><p>Otherwise, if <var>isTopLevelSelfFetch</var> is true, then set
+ <var>stringOrEnvironment</var> to the string "<code>top-level-self-fetch</code>".
```suggestion
<var>stringOrEnvironment</var> to "<code>top-level-self-fetch</code>".
```
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1879#pullrequestreview-3477493060
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/fetch/pull/1879/review/3477493060@github.com>
Received on Tuesday, 18 November 2025 12:21:14 UTC