Write websites with Wasm, render UI with WebGL or something similar. Implement JavaScript as a compiler to Wasm (which runs on Wasmitself), implement HTML+CSS renderer as a library which runs on Wasm as well. So basically your browser need to implement Wasm and WebGL which sounds reasonable task. Well, that's simplification, of course, it need to implement some HTTP API like XMLHttpRequest, local storage API and so on, but it's manageable.
Here's an example of website written with Rust and rendering all UI to canvas: https://makepad.github.io/makepad/ it works right now and it's very fast and smooth.
IMO tech for next generation web apps is already here and it's great.