Skip to content
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

Correct unload event timing for different COOP #7884

Merged
merged 6 commits into from
May 31, 2022
Merged

Conversation

noamr
Copy link
Collaborator

@noamr noamr commented May 3, 2022

Sometimes a navigation causes a BCG swap, e.g. when the
cross-origin isolated capability changes.

In that case:

  • the timestamps should coarsened based on both documents
  • Some user-agents unload in parallel, which should not become
    part of the new document's timing info
  • Time origin should be according to the new global's time origin, but coarsened by both.

Closes w3c/navigation-timing#169

  • At least two implementers are interested (and none opposed):
  • Tests are written and can be reviewed and commented upon at:
  • Implementation bugs are filed:
    • Chrome: …
    • Firefox: …
    • Safari: …
    • Deno (only for timers, structured clone, base64 utils, channel messaging, module resolution, web workers, and web storage): …
    • Node.js (only for timers, structured clone, base64 utils, channel messaging, and module resolution): …

(See WHATWG Working Mode: Changes for more details.)


/browsing-the-web.html ( diff )

@domenic
Copy link
Member

domenic commented May 3, 2022

It's not clear whether this solution has implementer buy-in, but it looks about right as a spec strategy if it does. I'll comment over there about some implications.

However if we do go this route it'd be helpful if you were also able to make an initial PR against #6315 (i.e. against the session-history branch). I've been merging in changes so far, but I'm not as confident this one can be carried over easily...

Sometimes a navigation causes a BCG swap, e.g. when the
cross-origin isolated capability changes.

In that case:
- the timestamps should coarsened based on both documents
- Some user-agents unload in parallel, which should not become
  part of the new document's timing info
- Time origin should be according to the new global's time origin, but coarsened by both.

Closes w3c/navigation-timing#169
@noamr
Copy link
Collaborator Author

noamr commented May 24, 2022

However if we do go this route it'd be helpful if you were also able to make an initial PR against #6315 (i.e. against the session-history branch). I've been merging in changes so far, but I'm not as confident this one can be carried over easily...

#7953

Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

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

Thanks so much for doing #7953 as well. That has similar issues to my review here but you don't need to worry about them. Now that I understand how to integrate, I think I can take over the merge process for that one.

@domenic domenic merged commit 0b273ea into whatwg:main May 31, 2022
@noamr noamr deleted the coop-unload branch May 31, 2022 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Should pages with different COOP be able to get unload event start/end.
2 participants