ui.Button.onClick

Registers a callback that's fired when the button is clicked.

Returns an ID which can be passed to unlisten() to unregister the callback.

UsageReturns
Button.onClick(callback)String
ArgumentTypeDetails
this: ui.buttonui.Button

The ui.Button instance.

callbackFunction

The callback to fire when the button is clicked. The callback is passed the button widget.

Examples

JavaScript

// Your example goes here!

Python

# Your example goes here!