MCPcopy Create free account
hub / github.com/GoogleChrome/samples / handleVisibilityChange

Function handleVisibilityChange

wakelock/script.js:48–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46 });
47
48 const handleVisibilityChange = () => {
49 if (wakeLock !== null && document.visibilityState === 'visible') {
50 wakeLock = requestWakeLock();
51 }
52 };
53
54 reaquireCheckbox.addEventListener('change', () => {
55 if (reaquireCheckbox.checked) {

Callers

nothing calls this directly

Calls 1

requestWakeLockFunction · 0.85

Tested by

no test coverage detected