Re: [csswg-drafts] [css-view-transitions-1] Should the DOMChangeCallback be posted as a task from skip transition steps? (#7904)

The downside of making it async is the following sequence:

- Queue a transition with createDocumentTransition.
- While snapshot is pending (so the callback hasn't run) initiate a new transition so the previous one is skipped.

It would be nice if the callback for the previous one consistently happened before or after we capture for the new one. But that depends on whether the event loop already has a task to run the next frame? I think the answer to this is a [microtask](https://html.spec.whatwg.org/multipage/webappapis.html#microtask) which would ensure that this runs before the next frame. @flackr on that.

Microtask won't help if multiple transitions are set up within the same frame but that seems like an edge case that the developer can handle better.

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


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

Received on Wednesday, 19 October 2022 15:44:16 UTC