chore: show android system webview update prompt if app fails to load (#2318)

This commit is contained in:
Aman Harwara
2023-04-26 22:58:59 +05:30
committed by GitHub
parent af1e18b47e
commit ec358d6b07
2 changed files with 56 additions and 2 deletions

View File

@@ -16,7 +16,14 @@
window.plansUrl = "https://standardnotes.com/plans";
window.dashboardUrl = "https://standardnotes.com/dashboard";
</script>
<script>
window.onerror = function (message, source, lineno, colno, error) {
if (document.readyState === "complete") {
return
}
window.ReactNativeWebView.postMessage("appLoadError");
};
</script>
<script src="web-src/app.js"></script>
</head>