Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 22 additions & 9 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -4439,15 +4439,28 @@ the response. [[!HTTP-CACHING]]
<p>To <dfn>populate request from client</dfn> given a <a for=/>request</a> <var>request</var>:

<ol>
<li><p>If <var>request</var>'s <a for=request>window</a> is "<code>client</code>", then: set
<var>request</var>'s <a for=request>window</a> to <var>request</var>'s <a for=request>client</a>
if <var>request</var>'s <a for=request>client</a>'s
<a for="environment settings object">global object</a> is a {{Window}} object; otherwise
"<code>no-window</code>".

<li><p>If <var>request</var>'s <a for=request>origin</a> is "<code>client</code>", then set
<var>request</var>'s <a for=request>origin</a> to <var>request</var>'s <a for=request>client</a>'s
<a for="environment settings object">origin</a>.
<li>
<p>If <var>request</var>'s <a for=request>window</a> is "<code>client</code>":

<ol>
<li><p>If <var>request</var>'s <a for=request>client</a> is non-null and <var>request</var>'s
<a for=request>client</a>'s <a for="environment settings object">global object</a> is a
{{Window}} object, then set <var>request</var>'s <a for=request>window</a> to
<var>request</var>'s <a for=request>client</a>'s
<a for="environment settings object">global object</a>.

<li><p>Otherwise, set <var>request</var>'s <a for=request>window</a> to "<code>no-window</code>".
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems wrong for the null client case. Since I think a null client case is always a navigation (or perhaps something especially esoteric in the network stack) and thus would have a window to show dialogs in.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upon reflection, I think most spec authors will use the null client case for things from the network stack. They won't necessarily be super-esoteric... just "browser features" like FedCM or similar.

So we might still want to do this automatically for them. Even if the browser UI navigation case goes a different path.

I'll leave this PR open in case we do want to go this route, and open a separate PR for the browser UI navigation path.

</ol>

<li>
<p>If <var>request</var>'s <a for=request>origin</a> is "<code>client</code>":

<ol>
<li><p><a>Assert</a>: <var>request</var>'s <a for=request>client</a> is non-null.

<li><p>Set <var>request</var>'s <a for=request>origin</a> to <var>request</var>'s
<a for=request>client</a>'s <a for="environment settings object">origin</a>.
</ol>

<li>
<p>If <var>request</var>'s <a for=request>policy container</a> is "<code>client</code>":
Expand Down