Running Python ASGI apps in the browser via Pyodide + a service worker

Research: Running Python ASGI apps in the browser via Pyodide + a service worker (https://github.com/simonw/research/tree/main/pyodide-asgi-browser#readme) Datasette Lite

Research: Running Python ASGI apps in the browser via Pyodide + a service worker (https://github.com/simonw/research/tree/main/pyodide-asgi-browser#readme)

    Datasette Lite (https://lite.datasette.io/) is my version of Datasette that runs entirely in the browser using Pyodide in WebAssembly.

When I first built it four years ago (https://simonwillison.net/2022/May/4/datasette-lite/) I used Web Workers and code that intercepts navigation operations and fetches the generated HTML by running the Python app.

This worked, but had the disadvantage that any JavaScript in