steveosoule
6/5/2013 - 5:17 PM

JavaScript Page Visibility

JavaScript Page Visibility

// http://daker.me/2013/06/5-html5-javascript-apis-to-keep-an-eye-on.html
document.addEventListener('visibilitychange', function(e) {
    console.log('hidden:' + document.hidden,
              'state:' + document.visibilityState)
}, false);