Back to Content

PageSwapEvent: viewTransition property

files/en-us/web/api/pageswapevent/viewtransition/index.md

latest698 B
Original Source

{{APIRef("HTML DOM")}}

The viewTransition read-only property of the {{domxref("PageRevealEvent")}} interface contains a {{domxref("ViewTransition")}} object representing the active view transition for the cross-document navigation.

[!NOTE] The active view transition can also be accessed via the {{domxref("Document.activeViewTransition")}} property.

Value

A {{domxref("ViewTransition")}} object, or null if no view transition is active when the event is fired.

Examples

See the main {{domxref("PageSwapEvent")}} page.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also