-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Update navigation's document creation to properly use fetch callbacks #8095
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
Comments
This might not be so bad. We can just use incrementally read. A few questions:
|
Some links are processed immediately, and links with This was put in the spec as a reflection of what Chrome/Safari do in practice.
I haven't dived into the streams API but I believe it calls processBodyError and then processEndOfBody because the stream is closed. |
Oh, ick, so we don't wait for a deterministic point in time like |
It's not that bad considering that it's just a preload and doesn't have an observable effect. But yea I'm not a huge fan of this. I'd rather we count on a |
Even after #6315, it's looking like the creation of Documents by feeding the parser network bytes will not be rigorous. It's going to be something like:
This obviously could be better. We should be using Fetch's processEarlyHintsResponse, processResponse, processResponseEndOfBody, and operate on the response body stream.
And, we can ideally be more rigorous about waiting for "scripts may run for the newly-created document", although that'll be especially tricky. Maybe we can just spin the event loop and not feed the parser anything until the session history is updated, once we have properly separated response header processing with processResponse.
Creating this as a tracking issue for that future work.
The text was updated successfully, but these errors were encountered: