Re: [csswg-drafts] [css-view-transitions-1] Behaviour of the `finished` promise (#7956)

> There's no concept of 'reverse' for View Transitions.

Yeah, no such concept right now. There is some discussion on this at #7957 but for now ViewTransitions build on animation primitives which are either active or not.

With option 2, when does the `finished` promise resolve with respect to `updateDOMCallback` callback. Especially because we're leaning to dispatch that callback using a task in #7904:

* Immediately when [skip the page transition](https://drafts.csswg.org/css-view-transitions-1/#skip-the-page-transition-algorithm) steps runs.
* After the callback is invoked but doesn't wait for the `domUpdated` promise to settle.
* After the `domUpdated` promise settles.

The WA-API doesn't have this problem since it synchronously reaches the end state if you call `finish()`.

Maybe an example of how developers would rely on the `finished` promise always resolving will help with this. I figured if some code needs to be executed when we've reached the end state, i.e. DOM has been updated, it should wait on `domUpdated` promise.

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


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

Received on Wednesday, 26 October 2022 19:15:39 UTC