I wonder why they never added an interface to run native code (for example assembly/C/C++/Rust...) to HTML web pages? Because without it CPU intense games will never run in the browser.
Some people might think the reason is of course because native code can take over the machine and infect it. But that's not true. Native code can be run in a sandbox without permission to do anything.
I know one problem might be there are countless (rare) architectures out there. But if someone wants to develop a game and he adds support for i486 and x64 so it will cover 99% of desktop machines. You can't run a normal desktop game on any arch either.
Another problem might be there are CPUs having vulnerabilities like "meltdown/spectre". But Android shows that allowing apps to run native (even without asking for permission) can be safe. To make it even safer the browser could ask the user to run native code before execution. Or the browser could reject native code or emulate it if there is a vulnerability in the CPU. I think not to implement native code because some few CPUs have security vulnerabilities is not the right way. It's like not using PCs at all because they sometimes crash.
So what are the true reasons a native interface was never added to HTML/JS?