Repository navigation
Version 0.2.0
Pre-release
Pre-release
This releases introduces some new helper functions for adding and removing events from a view. Here's some example usage:
// Add a click listener on the button element, which is a child of itemView.
listener := view.AddEventListener(itemView, "click", "#button", func(ev dom.Event) {
// Use ev.CurrentTarget to get the element itself
log.Printf("%+v was clicked!", ev.CurrentTarget())
}
// If we want to remove the event listener later, we can call listener.Remove()
listener.Remove()Full documentation is available on godoc.org.
Full Changelog
- Implemented
AddEventListenerand related methods to make it easy to add and remove event listeners to child elements of a view. - Updated README, documentation, and CONTRIBUTING.