AFAIK the VM creates a thread per core (by default) and schedules Processes across those threads and stuff. I'd say this might be possible to do with Web Workers. Sounds like it could be fun, probably a challenge to make it fast.
What's stopping a compile of Erlang to JS via LLVM and Emscripten and just taking the expected performance hit?
Erlang doesn't compile to machine code, but to bytecode that runs into the Erlang VM. So you would probably have to run the Erlang VM on top of javascript... I'm not sure whether it's possible, but it sure sounds heavy.
With WebAssembly, you should be able to compile the Erlang VM itself to it.
There is the LLVM backend in Erlang as of version 17. I haven't seen much info on it. I haven't seen anyone try to go the whole process from Erlang code to LLVM to Emscripten to JavaScript. I am interested to know what hurdles there might be, performance, etc.
If you want to add processes, that could be very hard.
If you also want the supervisors, that's difficult but probably not has much as adding Erlang style processes.