Last active
March 28, 2019 10:57
-
-
Save fhdalikhan/62d3894c5b56d0c696bff09c2fb40c5a to your computer and use it in GitHub Desktop.
Hook into the page's visible event, for e.g. if a page tab goes into backgroud or if a page tab becomes active
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener("visibilitychange", function() { | |
console.log( document.visibilityState ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment