On adds the given event handler to the [WidgetBase.Listeners.Normal] for the given event type. Listeners are called in sequential descending order, so this listener will be called before all of the ones added before it. On is one of the main ways to add an event handler to a widget, in addition to O
(etype events.Types, fun func(e events.Event))
| 46 | // event handlers that are called before and after those added by this function, |
| 47 | // respectively. |
| 48 | func (wb *WidgetBase) On(etype events.Types, fun func(e events.Event)) { |
| 49 | wb.Listeners.Normal.Add(etype, fun) |
| 50 | } |
| 51 | |
| 52 | // OnFirst adds the given event handler to the [WidgetBase.Listeners.First] for the given |
| 53 | // event type. FirstListeners are called in sequential descending order, so this first |
no test coverage detected