We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
onpagehide
onpageshow
<video id="video" src="video.webm" width="300" controls></video>
var video = document.getElementById('video'); window.addEventListener('pageshow', playVideo); window.addEventListener('pagehide', pauseVideo); function playVideo() { console.log(video.duration); if (video.paused) { video.play(); console.log(video.currentTime); } } function pauseVideo() { video.pause(); console.log(video.currentTime); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
onpagehide
事件在用户离开网页时触发(隐藏窗口,切换浏览器页签)onpageshow
事件在用户浏览网页时触发The text was updated successfully, but these errors were encountered: