Yo uso la biblioteca basada en jQuery Select2.
Dentro de la biblioteca https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.js se define la siguiente función:
MultipleSelection.prototype.selectionContainer = function () { var $container = $( '<li class="select2-selection__choice">' + '<button type="button" class="select2-selection__choice__remove" ' + 'tabindex="-1">' + '<span aria-hidden="true">×</span>' + '</button>' + '<span class="select2-selection__choice__display"></span>' + '</li>' ); return $container; };¿Cómo puedo cambiar/sobrescribir esta función sin cambiar el archivo original?