Are there callbacks for elementSelect macro? I am writing a custom field type that makes use of Craft's asset selector, and saw that there is an elementSelector macro (in includes/_forms). I want to be able to do some things onSelect, but I cannot tell if that is possible with the elementSelector macro. I know the element select modals can be extended using Craft.createElementSelectorModal(). Is this the only way to access element select modal callbacks?
You can get the Element Select’s JS instance like so:

$(document).ready(function() {
  var elementSelect = $('#your-container-id').data('elementSelect');
});


(Replace your-container-id with whatever ID you passed into the id param when calling forms.elementSelect or forms.elementSelectField.)

Then you can attach a selection callback to that:

elementSelect.on('selectElements', function(elements) {
  // ...
});


There’s also a 'removeElements' callback function you can add.