All of them already have some kind of support in WebAssembly.
Not that I'm satisfied with the current state of browsers mind you. I just think not being forced to install someone's binary blob to look at web content is a net benefit.
Now you can enjoy Flash like ads using WebAssembly + WebGL, making it all a Phyrric victory.
Chromium-based: --js-flags=--noexpose_wasm
Firefox-based: about:config javascript.options.wasm = false
Webassembly is clearly an improvement over the old plugins. For one thing it's a full virtual machine and was designed with sandboxing in mind.
Those browser flags aren't something Joe and Jane users are capable to be aware of, can disappear at any time anyway, and are not a thing on mobile devices.
A sandboxing that isn't bullet proof and can still be exploited by triggering memory corruption on the linear memory segment, thus changing decisions based on the data contents.
The only way for Qt to compete with Electron is to become Electron.
Now we can have broken accessibility, usability, broken theming, and bad integration on both platforms, yay!
It makes sense, from the perspective of shops who invested heavily in upskilling on Qt, to reuse the knowledge to build web apps.
regarding the how.. Qt provides a CMake wrapper which sets up the relevant flags automatically so with CMake/Qt projects it pretty much just works. Here's my build scripts:
- https://github.com/ossia/score/blob/master/ci/wasm.deps.sh
- https://github.com/ossia/score/blob/master/ci/wasm.build.sh