Files
bincio-activity/mobile/extraction
Davide Scaini 4cabbea0d4 fix(mobile): three-patch compat shim for Chrome <80 (Karoo WebView 61)
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 <script>-tag path with v0.26.4.
2026-04-26 15:19:39 +02:00
..