files/en-us/web/api/viewtransition/updatecallbackdone/index.md
{{APIRef("View Transition API")}}
The updateCallbackDone read-only property of the
{{domxref("ViewTransition")}} interface is a {{jsxref("Promise")}} that fulfills when the promise returned by the {{domxref("Document.startViewTransition()", "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
updateCallbackDonepromise of the associatedViewTransitionis automatically fulfilled.
A Promise.
// 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}}
{{Compat}}