once

fun once(event: String, handler: (data: Any) -> Unit)

Registers an event handler for a given event

  • sets the once property to true, to ensure it's removed after the first invocation