From c0fcac0d1956caa2c426f1b265ccab7bdfc007bc Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 26 Aug 2022 11:30:42 -0700 Subject: Native environment check --- modern/src/common/components/NativeInterface.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modern/src/common') 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); -- cgit v1.2.3