document.addEventListener('visibilityChange', function(e) {
console.log("hidden: " + document.hidden, "starge: " + document.visibilityState);
// visibilityState:
}, false);
More than 5 years have passed since last update.
要素の表示状態が変化したときに投げられるイベント. GDD11jpで聞きながら書いたコードなので動くかどうかは分からないがメモしておく.
Last updated at Posted at 2012-03-16
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme