src/interactivity/Interactivity.js
/**
     * Register an event handler for the given type.
     *
     * @param {string} eventName - Type of event to listen for
     * @param {function} callback - Function to call in response to given event, function will be called with a {@link carto.FeatureEvent}
     * @memberof carto.Interactivity
     * @instance
     * @api
     */
Register an event handler for the given type.
Register an event handler for the given type .
on (eventName, callback) {
        checkEvent(eventName);
        this._numListeners[eventName] = (this._numListeners[eventName] || 0) + 1;
        return this._emitter.on(eventName, callback);
    }
on ( eventName , callback ) { checkEvent ( eventName ) ; this . _numListeners [ eventName ] = ( this . _numListeners [ eventName ] || 0 ) + 1 ; return this . _emitter . on ( eventName , callback ) ; }
Register an event handler for the given type.
Register an event handler for the given type .