on
Description​
Registers to the event with the given handler
- JavaScript
- C#
- Kotlin
on(value: () => void): () => void
() => void On(() => void value)
fun on(value: () => void): () => void
Parameter | Summary |
---|---|
valueAll | The function to call when the event occurs. |
Returns​
A function which can be called to unregister the registered handler. This is usedful if the original function passed to this is not stored somewhere but unregistering of the event needs to be done.