diff options
author | Anton Tananaev <anton@traccar.org> | 2022-08-26 11:30:42 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-08-26 11:30:42 -0700 |
commit | c0fcac0d1956caa2c426f1b265ccab7bdfc007bc (patch) | |
tree | 5818524e8c8f303dc19c08d7feacace76c9ef896 /modern/src/common/components | |
parent | 85898ce9db35333c2dd3fdf6998f89aa10645280 (diff) | |
download | trackermap-web-c0fcac0d1956caa2c426f1b265ccab7bdfc007bc.tar.gz trackermap-web-c0fcac0d1956caa2c426f1b265ccab7bdfc007bc.tar.bz2 trackermap-web-c0fcac0d1956caa2c426f1b265ccab7bdfc007bc.zip |
Native environment check
Diffstat (limited to 'modern/src/common/components')
-rw-r--r-- | modern/src/common/components/NativeInterface.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modern/src/common/components/NativeInterface.js b/modern/src/common/components/NativeInterface.js index d36b64c5..4e6ad4fe 100644 --- a/modern/src/common/components/NativeInterface.js +++ b/modern/src/common/components/NativeInterface.js @@ -3,6 +3,8 @@ import { useDispatch, useSelector } from 'react-redux'; import { useEffectAsync } from '../../reactHelper'; import { sessionActions } from '../../store'; +export const nativeEnvironment = window.appInterface || (window.webkit && window.webkit.messageHandlers.appInterface); + export const nativePostMessage = (message) => { if (window.webkit && window.webkit.messageHandlers.appInterface) { window.webkit.messageHandlers.appInterface.postMessage(message); |