Looking for help : |

Worked for me in the playground. Suspect that Code doesn't provide the same environment as a browser, and that js.Global or js.Global.Get("document") is nil.
Try println(js.Global) and println(js.Global.Get("document")). And maybe try running your generated code in a browser or in Node.js, which are both supported environments. Not sure Code is.
looks like you are using go run to run gopherjs. It's generally okay to use go build or go install. But to run it, you might need to compile it to a js file.
锛欴 3q@kelwang
Most helpful comment
looks like you are using go run to run gopherjs. It's generally okay to use go build or go install. But to run it, you might need to compile it to a js file.