I have doodled a bit in C# webassemblies. They make it possible to use C# in a browser. Then it dawned on me, that WASM could be a security measure in JS. By encapsulating my app in a WASM nobody can see my code anymore. The need for backend logic is minimized and JS is secure.