page-visibility-shim
v1.0.2
Published
Packaged version of the Page Visibility API shim provided on MDN
Downloads
396
Readme
page-visibility-shim
Packaged version of the Page Visibility API shim provided on MDN
Install
npm install page-visibility-shim
Use
var pageVisibilityShim = require('page-visibility-shim');
pageVisibilityShim.hidden // Appropriate "document.hidden" key for the browser
pageVisibilityShim.visibilityChange // Appropriate event name for visibility change for the browser