W3cubDocs

/Web APIs

ViewTransition: updateCallbackDone property

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

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

updateCallbackDone is useful when you don't care about the success/failure of the transition animation, and just want to know if and when the DOM is updated.

Value

A promise.

Examples

js

// start new 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

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
updateCallbackDone 111 111 No No 97 No 111 111 No No No 22.0

See also

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/ViewTransition/updateCallbackDone