on

rootComponents. on

Source:

Attaches the callback's associated with the WebGL canvas element to the event.

Example

function clickCallback() {
  console.log('CLICKED');
}

$$$
.on('click', clickCallback)
.trigger('click') // logs 'CLICKED'