Nothing. People have been able to compile other languages into java bytecode for decades already. That didn't turn java into the one true runtime to rule them all, and webassembly will not be any different.
I wish browser makers would focus into making the browser user and development experience actually work instead of going after the latest shiny feature.
In the early days of Java, it was bundled with the browser. But because Sun didn't make their own (popular) browser, they couldn't dictate the terms for what features a browser was expected to include.
How are any of this relevant if we talk about a hypothetical future if Java was continued to be used in browsers?
Browsers would include a JRE (which they actually did at a time as well, but that’s just a tiny technicality either way), there wasn’t even mobiles capable of browsing the net at the time, but there is nothing inherently unsolvable, it’s not like there is no partitioning between wasm and js world, but in this alternative reality there wouldn’t be js. Java could have access to the DOM.
I wish browser makers would focus into making the browser user and development experience actually work instead of going after the latest shiny feature.