Emits

This lets you statically verify you send the events you claim you send and gives you a hook to document them.

Please note that a widget may send events not listed as Emits. You can always construct and dispatch dynamic and custom events, but the static list helps ensure you get them right.

If this is declared, you can use Widget.emit to send the event.

All events work the same way though, following the capture->widget->bubble model described under Event.

  1. mixintemplate Emits(EventType)
    mixin template Emits (
    EventType
    ) {}
  2. mixintemplate Emits(string eventString)

Meta

History

Added May 4, 2021