ViewTransition: skipTransition() method

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The skipTransition() method of the ViewTransition interface skips the animation part of the view transition, but doesn't skip running the document.startViewTransition() callback that updates the DOM.

Syntax

js
skipTransition()

Parameters

None.

Return value

undefined.

Examples

js
// start new view transition
const transition = document.startViewTransition(() => displayNewImage());

// skip the animation and just update the DOM
transition.skipTransition();

Specifications

Specification
CSS View Transitions Module Level 1
# dom-viewtransition-skiptransition

Browser compatibility

desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
skipTransition
Experimental

See also