The simple answer is that yes, you can use either method. I’ve been trying out the Go WebAssembly support, and although it’s very new, it does work … with some caveats.
If you want to try it, my app is online already on my website: http://jayts.com/vp/
(I’ll have some directions for playing the game later, but for now you can just search for “video poker strategy” or the like if you are not familiar with this popular casino game. One thing I’ll say for now is that you can also play using the keyboard, and if you open Developer Tools, you can play the game in the debug console. keys A-I choose different variants of video poker. A manual page for the console version of the game is here: https://github.com/Yaoir/Go-VideoPoker.)
I’m working to get the source code together enough to publish on GitHub. I hope it will help other Go programmers learn about Go’s WebAssembly support and motivate them to try it.
Go: WebAssembly support is only a couple of months old, and it’s documented like this:
This package is EXPERIMENTAL. Its current scope is only to allow tests to run, but not yet to provide a comprehensive API for users. It is exempt from the Go compatibility promise.
So it’s the usual situation that early adopters take risks, but if things work out, get the most rewards.