visibility.html 271 B

12345678910111213
  1. <html>
  2. <body>
  3. <p>A (mostly) empty page.</p>
  4. </body>
  5. <script>
  6. var gotHide = false;
  7. document.addEventListener("visibilitychange", function() {
  8. if (document.visibilityState !== 'visible') {
  9. gotHide = true;
  10. }
  11. });
  12. </script>
  13. </html>