I haven't done much client side javascript, but I'm used to seeing 'class' and 'onClick' as attributes on a div or button. Strange that no errors were generated anywhere, but anyway, both tips work perfectly, Thanks!! Peter
On Saturday, 30 March 2019 20:28:56 UTC+1, Rusco wrote: > > If you try out your code in Javascript you can spot your error, it would > be something like: > > but.className = "somecssclass"; > but.addEventListener("click", somefunction); > > > so for syscall/js (untested) something like: > > var cb js.Callback cb = js.NewCallback(func(args []js.Value) { > fmt.Println("Clicked") }) but.Set("className", "button42") > but.Call("addEventListener", "click", cb) > > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.