feat(core): add check for standalone mode (#15001)

* feat(core): add check for standalone mode

* feat(): add check for isStandalone

* feat(core): add check for standalone mode
This commit is contained in:
Mike Hartington
2018-08-06 15:28:38 -04:00
committed by Manu MA
parent 60f5731339
commit 0b4b9fe40c
2 changed files with 8 additions and 2 deletions

View File

@ -57,6 +57,10 @@ export function isElectron(win: Window): boolean {
return testUserAgent(win, /electron/);
}
export function isStandaloneMode(win: Window): boolean {
return win.matchMedia('(display-mode: standalone)').matches;
}
export function needInputShims(win: Window) {
return isIOS(win) && isDevice(win);
}