-
Notifications
You must be signed in to change notification settings - Fork 44
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
Align navigate and reload with the HTML spec #861
base: main
Are you sure you want to change the base?
Conversation
I am not sure if accessing the navigation ID in this way is correct (it looked like it might not be for reload). Any suggestions are welcome. |
@jgraham what do you think about using ongoing navigation this way? PTAL |
index.bs
Outdated
|
||
1. Return the result of [=await a navigation=] with |navigable|, |request| and | ||
|wait condition|. | ||
1. Let |navigation id| be |navigable|'s [=ongoing navigation=]. |
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 actually doesn't work, and may require changes on the HTML side. The problem is that we can return from the above algorithm without starting a new navigation, and this step will get the id of some other navigation (or maybe null). Previously that was OK because we already knew the navigation id at this point, so in the next step we'd notice that a failure event had been dispatched and return. But now we need the navigation to be initiated to find the correct id.
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 wonder if the part using await for events after the navigate is also flawed, since by the time the await is called some events might have already happened?
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.
Hmm, looks like it probably is because await
doesn't have a way to synchronously check if the resume condition was already met.
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 am not sure I am ready to propose a change to the HTML spec right now, but perhaps we could specify here that we want to yield the navigation id back to our algorithm as soon as it is defined on the step 6 and run the rest of the navigate/reload algorithm in parallel?
316f7d4
to
61f8f59
Compare
61f8f59
to
c7c8f7d
Compare
Closes #858
Preview | Diff