refactor: window background color on mobile, hide webview until ready (#2618) [skip e2e]

This commit is contained in:
Aman Harwara
2023-11-03 16:50:11 +05:30
committed by GitHub
parent 0902580b79
commit 86e9c90c10
4 changed files with 20 additions and 2 deletions

View File

@@ -16,6 +16,9 @@ declare global {
webClient?: DesktopManagerInterface
electronRemoteBridge?: unknown
reactNativeDevice?: WebDevice
ReactNativeWebView?: {
postMessage: (message: string) => void
}
platform?: Platform
isClipper?: boolean
@@ -91,6 +94,10 @@ const startApplication: StartApplication = async function startApplication(
onDestroy={onDestroy}
/>,
)
if (window.ReactNativeWebView) {
window.ReactNativeWebView.postMessage('appLoaded')
}
}
const domReady = document.readyState === 'complete' || document.readyState === 'interactive'