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

Chrome 125 + Safari 18.2 support startViewTransition() with object #26193

Merged
merged 2 commits into from
Mar 24, 2025

Conversation

caugner
Copy link
Contributor

@caugner caugner commented Mar 12, 2025

Summary

Adds startViewTransition() subfeature for accepting an options object.

Test results and supporting details

Chromium impl: https://chromestatus.com/feature/5089552511533056
WebKit impl: WebKit/WebKit@c6cadba (in 620.1.2 before Safari 18.2)

Related issues

See:

@github-actions github-actions bot added data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API size:m [PR only] 25-100 LoC changed labels Mar 12, 2025
@caugner caugner requested a review from Elchi3 March 14, 2025 13:53
Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

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

@caugner
Copy link
Contributor Author

caugner commented Mar 18, 2025

@Elchi3 This one is a bit tricky, as the method accepts either a ViewTransitionUpdateCallback or a StartViewTransitionOptions object, but in both cases the parameter is called callbackOptions. So there isn't a options parameter:

partial interface Document {
ViewTransition startViewTransition(optional (ViewTransitionUpdateCallback or StartViewTransitionOptions) callbackOptions = {});
}

But since CSS View Transitions Level 1 calls the parameter updateCallback, should we add both updateCallback_parameter and callbackOptions_parameter instead?

@Elchi3
Copy link
Member

Elchi3 commented Mar 20, 2025

But since CSS View Transitions Level 1 calls the parameter updateCallback, should we add both updateCallback_parameter and callbackOptions_parameter instead?

Yes, I think that sounds reasonable to me.

@caugner
Copy link
Contributor Author

caugner commented Mar 21, 2025

Yes, I think that sounds reasonable to me.

@Elchi3 Done in 325b427.

@caugner caugner force-pushed the startViewTransition-options-object branch from 4426ddb to 325b427 Compare March 21, 2025 14:35
Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

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

Thank you! 👍

@Elchi3 Elchi3 merged commit 11de18e into main Mar 24, 2025
10 checks passed
@Elchi3 Elchi3 deleted the startViewTransition-options-object branch March 24, 2025 13:33
@mdn-bot mdn-bot mentioned this pull request Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API size:m [PR only] 25-100 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants