docs/v2/vendor/showdown/showdown.js
function listen(name, callback) {
    if (!showdown.helper.isString(name)) {
      throw Error('Invalid argument in converter.listen() method: name must be a string, but ' + typeof name + ' given');
    }

    if (typeof callback !== 'function') {
      throw Error('Invalid argument in converter.listen() method: callback must be a function, but ' + typeof callback + ' given');
    }

    if (!listeners.hasOwnProperty(name)) {
      listeners[name] = [];
    }
    listeners[name].push(callback);
  }
function listen(name, callback) {
    if (!showdown.helper.isString(name)) {
      throw Error('Invalid argument in converter.listen() method: name must be a string, but ' + typeof name + ' given');
    }

    if (typeof callback !== 'function') {
      throw Error('Invalid argument in converter.listen() method: callback must be a function, but ' + typeof callback + ' given');
    }

    if (!listeners.hasOwnProperty(name)) {
      listeners[name] = [];
    }
    listeners[name].push(callback);
  }
function listen ( name , callback ) { if ( ! showdown . helper . isString ( name ) ) { throw Error ( 'Invalid argument in converter.listen() method: name must be a string, but ' + typeof name + ' given' ) ; } if ( typeof callback !== 'function' ) { throw Error ( 'Invalid argument in converter.listen() method: callback must be a function, but ' + typeof callback + ' given' ) ; } if ( ! listeners . hasOwnProperty ( name ) ) { listeners [ name ] = [ ] ; } listeners [ name ] . push ( callback ) ; }
Listen to an event
@param {string} name
@param {function} callback
Listen to an event