You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 12, 2019. It is now read-only.
From the docs of ATH v3 you were saying that the window.navigator.standalone property wasn't supported for Chrome and that there was no way of recognizing whether a Chrome user was opening the page from the homescreen or not.
var launchedFromPinnedHomescreen:Bool = false;
if (window.matchMedia) {
launchedFromPinnedHomescreen = window.matchMedia('(display-mode: standalone)').matches;
}
//iOS safari doesn't report window.matchMedia correctly, so we rely on navigator.standalone (which Chrome doesn't have)
if (!launchedFromPinnedHomescreen) {
if (window.navigator.standalone) launchedFromPinnedHomescreen = window.navigator.standalone;
}
}
The window.matchMedia functions allows you to look if certain media queries are applied, similar to the media querries used by CSS. iOS Safari also had this function but returns false whenever it was tested, so the window.navigator.standalone property needs to be used there.
I was unsure how to get this information across, so I decided to open an issue for it.
The text was updated successfully, but these errors were encountered:
From the docs of ATH v3 you were saying that the
window.navigator.standalone
property wasn't supported for Chrome and that there was no way of recognizing whether a Chrome user was opening the page from the homescreen or not.From some Google documentation I managed to find the following:
The
window.matchMedia
functions allows you to look if certain media queries are applied, similar to the media querries used by CSS. iOS Safari also had this function but returns false whenever it was tested, so thewindow.navigator.standalone
property needs to be used there.I was unsure how to get this information across, so I decided to open an issue for it.
The text was updated successfully, but these errors were encountered: