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

> You mean fixing it so that `vt.updateCallbackDone` would be syntactic sugar to `vt.ready.catch()`? That would be a bit of a waste

No, because `updateCallbackDone` rejects if the promise returned from the update callback is a rejection, whereas `vt.ready.catch()` never rejects.

> It's perhaps worth a discussion, I think the purpose of `updateCallbackDone` is unclear,

Does the example here make sense? https://developer.chrome.com/docs/web-platform/view-transitions/#api-reference

Also see the docs here https://drafts.csswg.org/css-view-transitions-1/#ref-for-dom-viewtransition-updatecallbackdone%E2%91%A0

> what I actually needed it a way to extend the update callback after the transition was created

It doesn't do that, and that isn't what it's designed for. If you need to extend the update callback, you should be adding more to the update callback. That's why it's a callback rather than a promise, else we lose the ability to catch errors etc.

-- 
GitHub Notification of comment by jakearchibald
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9762#issuecomment-1877246796 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 15:06:15 UTC