Skip to content

Commit db677a8

Browse files
committed
Add debug logging for visibility changes
1 parent 3135cdf commit db677a8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/env.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import EventHandling from './eventhandling';
22
import { applyMixins } from './util';
3+
import log from './log';
34

45
class Env {
56
hiddenProperty: "hidden" | "mozHidden" | "msHidden" | "webkitHidden";
@@ -38,8 +39,10 @@ class Env {
3839

3940
setVisibility (): void {
4041
if (document[this.hiddenProperty]) {
42+
log(`[Env] Going into background mode`);
4143
this.goBackground();
4244
} else {
45+
log(`[Env] Going into foreground mode`);
4346
this.goForeground();
4447
}
4548
}

0 commit comments

Comments
 (0)