From 4cabbea0d463f981912d1acd7d4de0cf74db7804 Mon Sep 17 00:00:00 2001 From: Davide Scaini Date: Sun, 26 Apr 2026 15:19:39 +0200 Subject: [PATCH] fix(mobile): three-patch compat shim for Chrome <80 (Karoo WebView 61) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Root causes identified via logcat: Chrome <71: globalThis not defined → ReferenceError in Pyodide factory, loadPyodide stays as {} (set by UMD wrapper), "not a function" Chrome <63: dynamic import() is a parse-time SyntaxError Chrome <63: for-await-of is a parse-time SyntaxError Fix: when Chrome <80 is detected, fetch v0.18.1 pyodide.js as text and apply three split/join patches before injecting via Blob URL: 1. prepend globalThis polyfill 2. import( → __loadScript( (script-tag shim) 3. for await( → for( (getFsHandles is never called in our flow) Chrome 80+ keeps the original clean