@@ -1666,17 +1666,48 @@ of the <a for="environment">target browsing context</a>'s <a>active document</a>
1666
1666
<a>environment settings object</a> .
1667
1667
1668
1668
<p> A <a for=/>request</a> has an associated
1669
- <dfn export for=request id=concept-request-window>window</dfn>
1670
- ("<code> no-window</code> ", "<code> client</code> ", or an
1671
- <a>environment settings object</a> whose
1672
- <a for="environment settings object">global object</a> is a
1673
- {{Window}} object). Unless stated otherwise it is
1674
- "<code> client</code> ".
1669
+ <dfn export for=request id=concept-request-window>window</dfn> , that is "<code> no-window</code> ",
1670
+ "<code> from-browser-ui</code> ", "<code> client</code> ", or an <a>environment settings object</a>
1671
+ whose <a for="environment settings object">global object</a> is a {{Window}} object. Unless stated
1672
+ otherwise it is "<code> client</code> ".
1673
+
1674
+ <div class=note>
1675
+ <p> This is used to determine whether and where to show necessary UI for the request, such as
1676
+ authentication prompts or client certificate dialogs.
1677
+
1678
+ <dl>
1679
+ <dt> "<code> no-window</code> "
1680
+ <dd> No UI is shown; usually the request fails with a <a>network error</a> .
1675
1681
1676
- <p class=note> The "<code> client</code> " value is changed to "<code> no-window</code> " or
1677
- <a for=/>request</a> 's <a for=request>client</a> during <a lt=fetch for=/>fetching</a> . It provides
1678
- a convenient way for standards to not have to explicitly set <a for=/>request</a> 's
1679
- <a for=request>window</a> .
1682
+ <dt> "<code> from-browser-ui</code> "
1683
+ <dd> This request was initiated by browser UI, and so any UI shown will not be associated to a
1684
+ specific window.
1685
+
1686
+ <dt> "<code> client</code> "
1687
+ <dd> This value will automatically be changed to either "<code> no-window</code> " or the request's
1688
+ <a for=request>client</a> during <a lt=fetch for=/>fetching</a> . This provides a convenient way
1689
+ for standards to not have to explicitly set a request's <a for=request>window</a> .
1690
+
1691
+ <dt> an <a>environment settings object</a>
1692
+ <dd> The UI shown will be associated with the specified {{Window}} object.
1693
+ </dl>
1694
+ </div>
1695
+
1696
+ <p> The <dfn for=request>appropriate user prompt context</dfn> for a <a for=/>request</a>
1697
+ <var> request</var> is determined as follows:
1698
+
1699
+ <ol>
1700
+ <li><p> <a>Assert</a> : <var> request</var> 's <a for=request>window</a> is not "<code> client</code> ".
1701
+
1702
+ <li><p> If the request's <a for=request>window</a> is an <a>environment settings object</a> , then
1703
+ the prompt should occur in a way attributable to <var> request</var> 's <a for=request>window</a> .
1704
+
1705
+ <li><p> Otherwise, if <var> request</var> 's <a for=request>window</a> is
1706
+ "<code> from-browser-ui</code> ", then the prompt should occur in a neutral context, e.g., on top of
1707
+ a blank page.
1708
+
1709
+ <li><p> Otherwise, there is no appropriate user prompt context.
1710
+ </ol>
1680
1711
1681
1712
<p id=keep-alive-flag> A <a for=/>request</a> has an associated boolean
1682
1713
<dfn for=request export id=request-keepalive-flag>keepalive</dfn> . Unless stated otherwise it is
@@ -5919,8 +5950,8 @@ run these steps:
5919
5950
<li>
5920
5951
<p> If <var> response</var> 's <a for=response>status</a> is 401, <var>httpRequest</var>' s
5921
5952
<a for=request>response tainting</a> is not "<code> cors</code> ", <var> includeCredentials</var> is
5922
- true, and <var> request</var> 's <a for=request>window</a> is an <a>environment settings object</a> ,
5923
- then :
5953
+ true, and <var> request</var> 's <a for=request>window</a> is either an
5954
+ <a>environment settings object</a> or " <code> from-browser-ui </code> " :
5924
5955
5925
5956
<ol>
5926
5957
<li class=XXX><p> Needs testing: multiple `<code> WWW-Authenticate</code> ` headers, missing,
@@ -5947,8 +5978,8 @@ run these steps:
5947
5978
<a for=/>appropriate network error</a> for <var> fetchParams</var> .
5948
5979
5949
5980
<li><p> Let <var> username</var> and <var> password</var> be the result of prompting the end user
5950
- for a username and password, respectively, in <var> request </var> 's
5951
- <a for=request>window</a > .
5981
+ for a username and password, respectively, in the <a>appropriate user prompt context</a> for
5982
+ <var> request </var > .
5952
5983
5953
5984
<li><p> <a>Set the username</a> given <var> request</var> 's <a for=request>current URL</a> and
5954
5985
<var> username</var> .
@@ -5975,9 +6006,8 @@ run these steps:
5975
6006
<a for=/>appropriate network error</a> for <var> fetchParams</var> .
5976
6007
5977
6008
<li>
5978
- <p> Prompt the end user as appropriate in <var> request</var> 's
5979
- <a for=request>window</a> and store the result as a
5980
- <a>proxy-authentication entry</a> . [[!HTTP]]
6009
+ <p> Prompt the end user as appropriate, in the <a>appropriate user prompt context</a> for
6010
+ <var> request</var> , and store the result as a <a>proxy-authentication entry</a> . [[!HTTP]]
5981
6011
5982
6012
<p class=note> Remaining details surrounding proxy authentication are defined by HTTP.
5983
6013
@@ -6156,10 +6186,8 @@ optional boolean <var>forceNewConnection</var> (default false), run these steps:
6156
6186
<p> If the HTTP request results in a TLS client certificate dialog, then:
6157
6187
6158
6188
<ol>
6159
- <li><p> If <var> request</var> 's <a for=request>window</a>
6160
- is an <a>environment settings object</a> , make the dialog
6161
- available in <var> request</var> 's
6162
- <a for=request>window</a> .
6189
+ <li><p> If <var> request</var> has an <a>appropriate user prompt context</a> , then make the
6190
+ dialog available in <var> request</var> 's <a>appropriate user prompt context</a> .
6163
6191
6164
6192
<li><p> Otherwise, return a <a>network error</a> .
6165
6193
</ol>
0 commit comments