Events

Reference

events.on(eventtype, func)

Start listening to events of a certain type. This method will take an event type and a function to call if the


event is triggered.

Parameters:
  • eventtype (str) – Type of the event. See possible types of events below

  • func (function) – function to call

events.once(eventtype, func)

Listen to the next event of a certain type. After the event is triggered once, the event listener will automatically


deactivate again. This method will take an event type and a function to call if the event is triggered.

Parameters:
  • eventtype (str) – Type of the event. See possible types of events below

  • func (function) – function to call

events.off(eventtype)

Stop listening to events of a certain type.

Parameters:

eventtype (str) – Type of the event

Examples

For examples and more information, see Handling Events