Since these are so small I don't see why we couldn't have a "demoscene launcher" with a "mailto:" style protocol handler and just let people click on base64 encoded links to start the demo.
You may argue that JS is sandboxed, but so is DOSBox. At least DOSBox can’t easily connect to remote servers over the internet.
Given that, it's not much of a sandbox.
Or does that require intervention from the host system rather than auto-mounting home and similar?
If we want to run code in browser there is WASM.
So is the proposal that it would it be beneficial to have a DOS-like OS or x86 emulator in WASM for running COM files?
Yes, that would be better and more sandboxed than dosbox running outside the browser.
Let's see if HN accepts the URL:
https://floooh.github.io/tiny8bit/c64.html?prg=AQgLCB4AnjIwN...