WebAssembly is different. WebAssembly brings every language to the web. Flash didn't.
WebAssembly can render to canvas and enable applications that compile to desktop, mobile, and the web. UI libraries like Avalonia do this: https://avaloniaui.net/
For example, here's C# implementation of Visual Basic 6 compiled to WebAssembly https://bandysc.github.io/AvaloniaVisualBasic6/ and source https://github.com/BAndysc/AvaloniaVisualBasic6
And a Solitaire demo https://solitaire.xaml.live/ and source https://github.com/AvaloniaUI/Solitaire
But WebAssembly applications can also manipulate the DOM like JavaScript. Example frameworks that do this:
- https://dotnet.microsoft.com/en-us/apps/aspnet/web-apps/blaz...
DOM access goes via JavaScript glue code for now. Eventually WebAssembly will get direct DOM access.
You can decide if you're making more of an application or more of a webpage. If you're making more of an application then why not just render to canvas with WebAssembly? And if you're making more of a webpage then why not have WebAssembly manipulate the DOM instead of JavaScript?
And for non-web uses, WebAssembly can be used in a plugin framework such as Extism: