4 ms·
Not sure it's superior. The object tag let you extend the browser with genuinely new capabilities, like access to hardware or APIs that JavaScript didn't expose
by nvm0n2 3y ago
Not sure it's superior. The object tag let you extend the browser with genuinely new capabilities, like access to hardware or APIs that JavaScript didn't expose. WASM doesn't do this.
Also, object tag let languages compete on the quality of their runtime. This also doesn't allow that. You can't ever do better than V8, and V8 isn't going to care about features unique to your language.
The main win is that the browser will keep the WASM interpreter/JIT up to date for you, and it will drop OS privs for you, and it will download and cache the bytecode for you.