With the launching of this API we have welcomed two new document property which does two different functions. The first one is document.visibilityState
and second one is document.hidden
.
document.visibilityState
holds four different values which are as below:
- hidden: Page is not visible on any screen
- prerender: Page is loaded off-screen and not visible to user
- visible: Page is visible
- unloaded: Page is about to unload (user is navigating away from current page)
Full article on http://code.tutsplus.com/articles/html5-page-visibility-api–cms-22021
September 2, 2014
Categories: JavaScript
Tags: html5, javascript, js