ViewTransition: updateCallbackDone property

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

The updateCallbackDone read-only property of the ViewTransition interface is a Promise that fulfills when the promise returned by the document.startViewTransition() method's callback fulfills, or rejects when it rejects.

updateCallbackDone is useful when you don't care about the success/failure of a same-document (SPA) view transition animation, and just want to know if and when the DOM is updated.

Note: In the case of a cross-document (MPA) view transition, the updateCallbackDone promise of the associated ViewTransition is automatically fulfilled.

Value

A Promise.

Examples

js
// start new SPA view transition
const transition = document.startViewTransition(() => displayNewImage());

transition.updateCallbackDone.then(() => {
  // Respond to the DOM being updated successfully
});

See Transitions as an enhancement for a useful example.

Specifications

Specification
CSS View Transitions Module Level 1
# dom-viewtransition-updatecallbackdone

Browser compatibility

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
updateCallbackDone

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support

See also