Skip to content

Commit

Permalink
Editorial: use break in navigate algorithm rather than a variable
Browse files Browse the repository at this point in the history
Also do not assume that all responses have a location URL (even though that would make more sense data-model-wise).
  • Loading branch information
annevk committed Feb 12, 2020
1 parent f425515 commit fdbd2bd
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -84514,10 +84514,10 @@ interface <dfn>Location</dfn> { // but see also <a href="#the-location-interface
data-x="concept-request-origin">origin</span> to that <span>browsing context scope
origin</span>.</p></li>

<li><p>Let <var>done</var> be false and <var>reservedEnvironment</var> be null.</p></li>
<li><p>Let <var>reservedEnvironment</var> be null.</p></li>

<li>
<p>While <var>done</var> is false:</p>
<p>While true:</p>

<ol>
<li><p>Let <var>currentURL</var> be <var>response</var>'s <span
Expand Down Expand Up @@ -84563,7 +84563,7 @@ interface <dfn>Location</dfn> { // but see also <a href="#the-location-interface
Content Security Policy?</span> algorithm returns "<code data-x="">Blocked</code>" when
executed upon <var>request</var>, <var>navigationType</var>, <var>sourceBrowsingContext</var>,
and <var>browsingContext</var>, then set <var>response</var> to a <span>network error</span>
and set <var>done</var> to true. <ref spec="CSP"></p></li>
and <span>break</span>. <ref spec="CSP"></p></li>

<li>
<p>Otherwise:</p>
Expand All @@ -84584,7 +84584,7 @@ interface <dfn>Location</dfn> { // but see also <a href="#the-location-interface
data-x="concept-response-location-url">location URL</span> or the <span
data-x="concept-response-location-url">location URL</span> is not a <span>URL</span> whose
<span data-x="concept-url-scheme">scheme</span> is an <span>HTTP(S) scheme</span>,
then set <var>done</var> to true.</p>
then <span>break</span>.</p>

<p class="note">Navigation handles redirects manually as navigation is the only place in
the web platform that cares for redirects to <code data-x="mailto protocol">mailto:</code>
Expand All @@ -84595,8 +84595,9 @@ interface <dfn>Location</dfn> { // but see also <a href="#the-location-interface
</ol>
</li>

<li><p>If <var>response</var>'s <span data-x="concept-response-location-url">location URL</span>
is failure, then set <var>response</var> to a <span>network error</span>.</p></li>
<li><p>If <var>response</var> has a <span data-x="concept-response-location-url">location
URL</span> that is failure, then set <var>response</var> to a <span>network
error</span>.</p></li>

<li><p>Otherwise, if <var>response</var> has a <span
data-x="concept-response-location-url">location URL</span> that is a <span>URL</span> whose <span
Expand Down

0 comments on commit fdbd2bd

Please sign in to comment.