Ben Lin
2024-06-25 7d26ed0e19bf952e7c037b21bfd687759b46e851
1
2
3
4
5
6
7
8
import { isBrowser } from './isBrowser';
 
export function isDocumentVisible(): boolean {
  if (isBrowser) {
    return document.visibilityState !== 'hidden';
  }
  return true;
}