Re: [csswg-drafts] [css-shared-element-transitions-1] Should createDocumentTransition start the transition (#7828)

Summary from offline discussion: Makes sense to follow the WA-API model and have the document.createDocumentTransition API also start the transition by initiating the capture phase. Registering a callback on a promise after it has already resolve still invokes the callback so the pattern above is not an issue. And if the developer wants to ensure that they register a callback with the ready promise (to synchronize work with the first frame), they can do any work requiring yielding before calling the API. Note that the callback passed to createDocumentTransition is also an opportunity where the developer can do any async work before animations start.

**Proposed Resolution**: document.createDocumentTransition(...) immediately starts the transition. No need for a "play" function to be called after.

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


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

Received on Tuesday, 18 October 2022 17:59:16 UTC