Riff / Built on the open web / Platform
pageshow
Restarts the frame loop after a Back from the back-forward cache.

How Riff uses it
When a page is restored from the back-forward cache, pageshow fires with persisted set. The handler repaints the seek line and, if the media element is still playing, restarts the per-frame loop the browser stopped when it froze the page.
Why
The audio element kept its state in the cache but the animation loop did not, so the music would be playing while the seek line sat still.
Without it
persisted is checked, so a normal load does nothing.
Where
- plugins/riff/assets/riff.js, line 1491
window.addEventListener( 'pageshow', ( e ) => {
Links open the source at the commit this page was published from.
Reference: pageshow on MDN.