JSFiddle - React, Tailwind, and code Playground

JavaScript

// only affects options.unique
var callbacks = new jQuery.Callbacks('unique');

var handler = function(m) {
    console.log(m + '!');
};

handler.boom = function(target) {
    if (typeof target != "function") {
        throw new TypeError();
    }
};

// first add does not recurse jQuery.each
callbacks.add(handler);

callbacks.fire('fire');

// try to add handler again, should just not add it,
// instead does jQuery.each and adds boom
callbacks.add(handler);

// this will error now
callbacks.fire('fire');