button.name.clicked - Events - Items API

Items API Events

button:[name]:clicked

Fires whenever a custom region button or custom dialog button is clicked.

You would want to be notified about this event firing, because you will naturally have some code that you want executed when your custom button is pressed.

Note The name in the event is the name/id given to the custom button, for example a button referenced as 'myCustomButton' will have an event called 'button:myCustomButton:clicked'.

Examples

itemsApp.on('button:myCustomButton:clicked', function () {
    console.log('This code executes when myCustomButton is clicked.');
});

Related articles

Was this article helpful?

Did you arrive here by accident? If so, learn more about Learnosity.