-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editorial: use break in navigate algorithm rather than a variable #5277
Conversation
Also do not assume that all responses have a location URL (even though that would make more sense data-model-wise).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oof, having both null and not present is pretty icky. Are you sure you don't want to fix that in Fetch? :)
|
||
<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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also assumes that there's a location URL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fine in that case as there's a break when there's not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand. If response is non-null but response has no location URL, then the following steps:
Let currentURL be response's location URL, if response is not null, and request's current URL otherwise.
If reservedEnvironment is not null and currentURL's origin is not the same as reservedEnvironment's creation URL's origin, then:
will "crash" first when you try to access response's location URL
, and then crash a second time when you try to access the non-existent location URL's origin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can you get there with a response that has no location URL though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. However, note that one has to look down to step 7.4 and up to step 1 to figure that out. Perhaps add an assert beforehand?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just leave it until the Fetch thing is fixed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess so.
The Fetch issue is whatwg/fetch#958 and I might do it I suppose, but I was hoping someone would pick it up as part of learning how to do things. |
Also do not assume that all responses have a location URL (even though that would make more sense data-model-wise).
/browsing-the-web.html ( diff )