Something went wrong. Try again.
experiments in a post-browser web
Something went wrong. Try again.
fix(mobile/android): use addDocumentStartJavaScript for safe-area insets master
Tauri's RustWebChromeClient overwrites any chrome-client override after onWebViewCreate returns, so onProgressChanged-based injection never fires. Switch to WebViewCompat.addDocumentStartJavaScript (the same API Tauri uses for its own init scripts) — registered on the WebView object, survives chrome-client swaps, runs before page JS on every navigation. Falls back to direct evaluateJavascript on the (rare) devices that lack DOCUMENT_START_SCRIPT feature support. Reads insets synchronously in onWebViewCreate so the first registration has real values even if the insets listener hasn't fired yet. Fixes Android header overlap behind the status bar.
Author burrito.space Date (May 25, 2026, 11:47 AM UTC) Commit 43a0e206 43a0e206098f3fb0fa74f7af33c91ca35751dedf Parent 85950be1 85950be12bb2540636aa70555aa39fb7567e9604 Change ID wwrpwlty wwrpwltytywnuxyuxylorlkqvnqpkrvr