I started to play with gotron yesterday, it is annoying fact that we need to construct a struct in order to start listening to an event.
window.On(&gotron.Event{Event: "event-name"}, func(bin []byte) {
//Handle event here
}
It will be such cleaner API, if On method can accept String param as following:
window.On("event-name", func(bin []byte) {
//Handle event here
}
I started to play with
gotronyesterday, it is annoying fact that we need to construct a struct in order to start listening to an event.It will be such cleaner API, if
Onmethod can acceptStringparam as following: