Skip to content
Open
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
39 changes: 34 additions & 5 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -5363,14 +5363,43 @@ 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>
<li><p><var>global</var> is a {{Window}} object;

<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> is not null;

<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 true.

<li><p>Let <var>stringOrEnvironment</var> be <var>requestEnvironment</var>.

<li><p>If <var>isTopLevelNavigation</var> is true, then set <var>stringOrEnvironment</var>
to "<code>navigation</code>".

<li><p>Otherwise, if <var>isTopLevelSelfFetch</var> is true, then set
<var>stringOrEnvironment</var> to "<code>top-level-self-fetch</code>".
</ol>

<li><p>Let <var>blob</var> be the result of <a>obtaining a blob object</a> given
<var>blobURLEntry</var> and <var>navigationOrEnvironment</var>.
<var>blobURLEntry</var> and <var>stringOrEnvironment</var>.
Copy link
Member

Choose a reason for hiding this comment

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

Just realized that stringOrEnvironment is undefined when request's client is null.


<li><p>If <var>blob</var> is not a {{Blob}} object, then return a <a>network error</a>.

Expand Down