[csswg-drafts] [css-view-transitions-1] Clarify timing o `updateCallbackDone` (#9762)

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

== [css-view-transitions-1] Clarify timing o `updateCallbackDone` ==
Currently `updateCallbackDone` is a reaction to the provided `update` callback (in `startViewTransition(update)`),
and activating the view transition is a reaction to `updateCallbackDone`.

This makes it so that author-provided `updateCallbackDone` reactions are *usually* called before capturing the new state, but sometimes after. This can create a confusion and subtle bugs.

I found that `updateCallbackDone` is most useful in its usual behavior, when all the author reactions are flushed and only then the new state is captured - this allows using this callback as a way to add new state changes on top of whatever is in the update callback 

Proposing to slightly change the wording so that it's clear that there's a microtask checkpoint between resolving `updateCallbackDone` and activating the view transition (capturing the new state).


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


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

Received on Thursday, 4 January 2024 09:57:22 UTC