// start new SPA view transition
const transition = document.startViewTransition(() => displayNewImage());
transition.updateCallbackDone.then(() => {
// Respond to the DOM being updated successfully
});ViewTransition: updateCallbackDone property / notebook
ViewTransition: updateCallbackDone property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.