Skip to content

Commit

Permalink
Await transition
Browse files Browse the repository at this point in the history
  • Loading branch information
dleeftink committed Nov 26, 2024
1 parent de0ba84 commit cf10b4b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/github-pages-router/dist/github-pages-router.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,12 @@
let last = sessionStorage.getItem('lastVisit')
if(this.debug) console.log('Setting', last);
this.contentElement.innerHTML = last;
document.startViewTransition(async () => {
const transition = document.startViewTransition(async () => {
await this.updateContent(contentUrl);
});

await transition.finished;

}

async updateContent(url) {
Expand Down

0 comments on commit cf10b4b

Please sign in to comment.