Re: [csswg-drafts] [css-view-transitions-2] Declaring when an MPA transition can start (#8681)

I think the problem with that is it's unclear when calling `waitUntil` would work. With the event the rules are simple: If you get the event, you can call `waitUntil` in the same task.

With your proposal, it's a value that the UA is going to set and unset at some points, and without an event, there's no indication when it'll be set and unset. Also, when is it unset? Presumably when the transition stops being 'active', which means `transition.finished`. That means there'll be a period where `document.activeTransition` exists, but `document.activeTransition.waitUntil()` will fail, because the transition has already started.

There's also an issue with naming. Would `document.startViewTransition` cause a new `document.activeTransition` to be set? If so, what happens with `document.activeTransition.waitUntil`, since that API doesn't make sense on same-document transitions.

If the event is useful for other things, it might be worth using the event for this too, as it doesn't have the above issues.

-- 
GitHub Notification of comment by jakearchibald
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8681#issuecomment-1562618533 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 25 May 2023 09:54:09 UTC