Skip to content

Commit

Permalink
Update files/en-us/web/api/view_transitions_api/using/index.md
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
chrisdavidmills and github-actions[bot] committed May 24, 2024
1 parent ecdc3d3 commit c7fa835
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions files/en-us/web/api/view_transitions_api/using/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -437,10 +437,13 @@ window.addEventListener("pagereveal", async (e) => {
// Went to profile page
// ~> Set VT names on the main title and image
if (isProfilePage(currentUrl)) {
setTemporaryViewTransitionNames([
[document.querySelector(`#detail main h1`), 'name'],
[document.querySelector(`#detail main img`), 'avatar'],
], e.viewTransition.ready);
setTemporaryViewTransitionNames(
[
[document.querySelector(`#detail main h1`), "name"],
[document.querySelector(`#detail main img`), "avatar"],
],
e.viewTransition.ready,
);
}
}
});
Expand Down

0 comments on commit c7fa835

Please sign in to comment.