[csswg-drafts] [css-view-transitions-1] What should we do if someone skips the view transition when flushing the previous update callbacks (#11943)

BorisChiou has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-view-transitions-1] What should we do if someone skips the view transition when flushing the previous update callbacks ==
This is more like a question because I don't have a testcase for this.

Per the recent update of the spec in [7.3. Setup view transition](https://drafts.csswg.org/css-view-transitions-1/#setup-view-transition-algorithm):
> To setup view transition for a ViewTransition transition, perform the following steps:
> 1. Let document be transition’s relevant global object’s associated document.
> 2. [Flush the update callback queue](https://drafts.csswg.org/css-view-transitions-1/#flush-the-update-callback-queue).
> 3. Capture the old state for transition.

The step 2, "flush the update callback queue" runs the scripts, so I'm thinking is it possible that script skips the current view transition we are setting up? It's impossible to call `skipTransition()` API in the previous update callbacks to skip the new view transition, so all I can think of is to change the visibility of the document. However, the change of visibility of the document queues a DOM task so it may happen after we setup the current view transition. However, I'm not sure if there are any other ways to skip the view transitions. (But it sounds like possible?)

So is it possible that someone skips the current view transition in previous update callbacks when we setup the current view transition? If it is possible, what is the expected behavior here?

cc @noamr and @emilio 

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11943 using your GitHub account


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

Received on Friday, 14 March 2025 21:17:43 UTC