visibilitychange in mobile safari standalone mode
问题 The Visibility API doesn't work in standalone mode on iOS. I need to know if the phone was unlocked with my app in the foreground so that I can check for an update, but nothing seems to work. I don't get the visibilitychange event. document.hidden is false, and document.visibilityState is "visible" when the phone is locked. I've also found that timers like setTimeout and requestAnimationFrame continue to function while the screen is locked, so I can't use the hacks I've found to detect that