A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.cdn.mozilla.net/en-US/docs/Web/API/ViewTransition/updateCallbackDone below:

ViewTransition: updateCallbackDone property - Web APIs

ViewTransition: updateCallbackDone property

Limited availability

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
// 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 Browser compatibility See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4