document.activeViewTransition is a read-only property that returns the ViewTransition currently active on the document, or null if none is running (MDN). It is a consistent way to re-read the active transition without saving the return value yourself.
Read the notes below before you get or set this property. Prefer feature detection when support is limited.
Syntax
Use document.activeViewTransition. Start with this line.
JavaScript
document.activeViewTransition
Call
What it does
document.activeViewTransition
Primary signature.
Built into the browser. Read or assign document.activeViewTransition — no import required.
Library declarations
JavaScript
document.activeViewTransition
Parameters
Parameter
Description
Writable?
Optional. Read-only instance property
Return Value
Return Value
Description
*
ViewTransition or null (MDN)
JavaScript Examples
Example 1 — Feature-Detect and Idle null
Check support, then read the property when no transition is running.
JavaScript
const supported = "activeViewTransition" in Document.prototype;
console.log(supported);
if (supported) {
console.log(document.activeViewTransition); // null when idle
} else {
console.log("activeViewTransition not supported");
}
Capture the return value from startViewTransition.
Compare immediately with document.activeViewTransition.
Same reference while the transition is in flight.
Use either: store vt, or re-read the property from another module later.
Compatibility
Browser Support
Document.activeViewTransition is a browser View Transition API property. MDN marks it Experimental (CSS View Transitions Module Level 2). Support is newer than startViewTransition() — always feature-detect.
✓ Experimental · Limited
Document.activeViewTransition
ViewTransition or null for the active document-scoped transition. Check current browser tables and detect before use.
LtdExperimental
Google ChromeRecent Chromium — feature-detect
Check
Microsoft EdgeFollow Chromium — feature-detect
Check
Mozilla FirefoxRecent versions — feature-detect
Check
Apple SafariRecent versions — feature-detect
Check
OperaFollow Chromium where available
Check
Internet ExplorerNo View Transition API
No
activeViewTransitionLimited
Bottom line: Detect activeViewTransition and startViewTransition before use. Keep a plain DOM-update fallback. See the MDN activeViewTransition reference.
Frequently Asked Questions
MDN: a ViewTransition instance for the view transition currently active on the document, or null if none is active.
MDN marks Document.activeViewTransition as Experimental (CSS View Transitions Module Level 2). It is not Deprecated or Non-standard. Always feature-detect before use.
Yes. You read it to get the active ViewTransition (or null). You do not assign a transition to the property.
document.startViewTransition() starts a same-document transition and returns a ViewTransition. activeViewTransition lets you re-read that ongoing transition later without keeping your own reference (MDN).
When the document has no active view transition — before one starts, after it finishes, or if the property is unsupported.
Document.activeViewTransition is document-scoped. Element.activeViewTransition is for element-scoped transitions on a single element subtree.