Javascript also does not have access to the chrome of the browser. Unless it's running in a WebExtension context, in which case you can also run WASM there.
WASM can CALL INTO JAVASCRIPT CODE. Which means it can do anything JS can do — in a "clunky hack" kind of way, sure, but people are building sugar on top of this already: https://github.com/koute/stdweb
So it's not the kind of sandbox you're thinking about. It's literally the same sandbox as JavaScript itself.
Also, I just realized — you're probably thinking of "compiling to JS" as in TypeScript/BuckleScript/Elm/ghcjs/ScalaJS/… — and yeah, that isn't easy to replace, because you'd have to implement a whole garbage collected runtime for WASM currently and that's kinda ridiculous.
Others (including me) are thinking of "compiling" as in Emscripten, and WASM was literally created to optimize this at first.
WASM can CALL INTO JAVASCRIPT CODE. Which means it can do anything JS can do — in a "clunky hack" kind of way, sure, but people are building sugar on top of this already: https://github.com/koute/stdweb
So it's not the kind of sandbox you're thinking about. It's literally the same sandbox as JavaScript itself.
Also, I just realized — you're probably thinking of "compiling to JS" as in TypeScript/BuckleScript/Elm/ghcjs/ScalaJS/… — and yeah, that isn't easy to replace, because you'd have to implement a whole garbage collected runtime for WASM currently and that's kinda ridiculous.
Others (including me) are thinking of "compiling" as in Emscripten, and WASM was literally created to optimize this at first.