Limited availability
The skipTransition()
method of the ViewTransition
interface skips the animation part of the view transition, but doesn't skip running the associated view update.
None.
Return valueundefined
.
// start new view transition
const transition = document.startViewTransition(() => displayNewImage());
// skip the animation and just update the DOM
transition.skipTransition();
Skipping an MPA view transition
// Fired on the current (outgoing) page
document.addEventListener("pageswap", (event) => {
event.viewTransition?.skipTransition();
});
// Fired on the destination (inbound) page
document.addEventListener("pagereveal", (event) => {
event.viewTransition?.skipTransition();
});
Specifications Browser compatibility See also
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4