Re: [csswg-drafts] [css-view-transitions-1] finished promise timing (#12442)

Yeah, I think roughly the resolution + discussion below it would end up with something like:

* If hasActiveAnimations is false:
    * If transition phase is "animating":
       * Set transition’s [phase](https://www.w3.org/TR/css-view-transitions-1/#viewtransition-phase) to "pending-done".
       * Post a task to continue the rest of the steps (and return after the task is posted)
       * if the transition phase is not 'pending-done' (transition skipped), abort the rest of the steps
       * clear the view transition state,
       * set the phase to done
       * resolve the finished promise

The difference from what you said is whether at the time finished promise callback runs, we should have already cleared the view transition state (it's finished), although visually last frame before that would still have displayed the view transition state


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


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

Received on Tuesday, 26 August 2025 15:16:22 UTC