What about moving to web assembly? Would it be relevant? Or is this a Firefox feature only? Or is this not interesting because the point is to write it in javascript?
WebAssembly will be supported by all browsers and JS engines, but it's not something you would use as your source code. I think at the moment it's more focused on high-performance use cases, e.g. rewriting a CPU-intensive function in C++, compiling it to WebAssembly, and calling it from your JS code. Or taking an existing C++ codebase and running it on the web without really using the DOM. But in the long run, I think WebAssembly will make it possible to do things like DOM interactions in other programming languages.