MCPcopy Create free account
hub / github.com/dailydotdev/apps / getInternalLifecycleState

Function getInternalLifecycleState

packages/shared/src/lib/lifecycle.ts:90–98  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

88 * @return {string}
89 */
90const getInternalLifecycleState = (): string => {
91 if (document.visibilityState === HIDDEN) {
92 return HIDDEN;
93 }
94 if (document.hasFocus()) {
95 return ACTIVE;
96 }
97 return PASSIVE;
98};
99
100export const getCurrentLifecycleState = (): string => {
101 if (wasActive) {

Callers 3

getCurrentLifecycleStateFunction · 0.85
listenToLifecycleEventsFunction · 0.85
handleEventsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected