I wonder how hard this would be to port to Hoot, a web assembly/wasm-ified Guile Scheme. https://spritely.institute/hoot/
It would be neat to have some real management APIs for the things running on a page, to be able to manage long running processes & workers.
A bit more niche than for general webapps, but systemgo comes to mind; a re-impl of some of systemd in go, specifically designed to be run on the web in Browsix. https://github.com/plasma-umass/systemgo