I just listened to episode 323 of the Software Engineering Radio podcast today and was struck by similar thoughts. They broached the topic of concurrency issues with WebAssembly and how shared-memory () multi-threading (which relies on SharedArrayBuffer) was incapacitated due to unforeseen security issues (SharedArrayBuffer and timing attacks, “Meltdown and Spectre”).
At that point, BEAM dinged in my head.
Either having a web browser built in top of the BEAM or having modern browsers use BEAM as a virtual machine in which to execute WebAssembly or something similar to that. In the extreme, maybe BEAM byte-code could even be a viable alternative to WebAssembly.
Perhaps having Elixir compile to WebAssembly would be interesting. As I understand it, one must use C++ or Rust for that right now (and Go is also adding support for it). WebAssembly has some issues with garbage collection (or, rather, lack thereof) which might make that difficult.