Js can have threading like wasm using SharedArrayBuffer and Atomics, but devs have to code like wasm since no structured object in it (see the proposal-structs).
Also note that SharedArrayBuffer and wasm threading would require secure context(mostly means https), Cross-Origin-Opener-Policy
, and Cross-Origin-Embedder-Policy
, which not only requires changes on server side, but also means that you can not use iframes with that, for example, you can not embed a youtube video in your page after that.
2 Likes