mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Remove self.document from page visibility event
This commit is contained in:
parent
84b69fa0e7
commit
0b061fb1ff
1 changed files with 8 additions and 10 deletions
|
@ -436,16 +436,14 @@ define(["appSettings", "browser", "events", "htmlMediaHelper", "webSettings"], f
|
|||
visibilityChange = "webkitvisibilitychange";
|
||||
}
|
||||
|
||||
if (self.document) {
|
||||
document.addEventListener(visibilityChange, function () {
|
||||
/* eslint-disable-next-line compat/compat */
|
||||
if (document[hidden]) {
|
||||
onAppHidden();
|
||||
} else {
|
||||
onAppVisible();
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
document.addEventListener(visibilityChange, function () {
|
||||
/* eslint-disable-next-line compat/compat */
|
||||
if (document[hidden]) {
|
||||
onAppHidden();
|
||||
} else {
|
||||
onAppVisible();
|
||||
}
|
||||
}, false);
|
||||
|
||||
if (self.addEventListener) {
|
||||
self.addEventListener("focus", onAppVisible);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue