This button is an HTML element, but it is not an HTML button. Styling and JavaScript provide the button-like look-and-feel.
The button.
string
The HTML id of the button will be
'button-' + id
. It is also used in the interpretation of
the translations
argument.
function
Unary function that takes a single parameter
of a nullary function. This function will be called on completion
of the work (which will be used to remove the button's 'click'
animation). If the function want to use as a callback does not take
an argument, you can wrap it in toolkit.withTimeout
. You
might also want to use toolkit.withTimeout
if your
function returns too quickly, otherwise the user might not see
the button click.
object
An object with a key id
having a value that is an object having a key 'name'
with value the display name of the button, and optionally a key
'help'
with value of the tooltip text.