Skip to content

Refactor window.On to accept String as Event #43

@ysweid

Description

@ysweid

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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions