demo · v142

External Skip & Observe

Before Chrome 142 the only place you could call .skipTransition() on a running view transition was from the caller that started it. With document.activeViewTransition, any module — a back-button handler, an analytics layer, an accessibility prefers-reduced-motion watcher — can reach into the live transition and skip it, or just observe its lifecycle without holding the original handle.

Two-panel swap, deliberately slow (1.8s)

Panel A

First state of A

Panel B

First state of B

activeViewTransitionnull
ready
finished
updateCallback

relevant markup

// Module A — start the transition
document.startViewTransition(() => mutateDom());

// Module B (totally separate) — read and act on the live transition
const vt = document.activeViewTransition;
if (vt) {
  // observe
  vt.ready.then(() => console.log("ready"));
  vt.finished.then(() => console.log("finished"));
  // or skip on demand
  vt.skipTransition();
}

why this is useful

see also