Skip to content

Version 0.2.0

Pre-release
Pre-release

Choose a tag to compare

@albrow albrow released this 27 Jul 01:46
· 6 commits to master since this 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 AddEventListener and related methods to make it easy to add and remove event listeners to child elements of a view.
  • Updated README, documentation, and CONTRIBUTING.