code: function (object, event, callback) {
          var index = this.indexOf(object);
          var listener = this.listeners[index];
          if (!listener) {
              listener = {
                  'object': object,
                  'events': {}
              };
              this.listeners.push(listener);
          }
  
          var callbacks = listener.events[event];
          if (!callbacks) {
              callbacks = [];
              listener.events[event] = callbacks;
          }
  
          // add the callback if it does not yet exist
          if (callbacks.indexOf(callback) == -1) {
              callbacks.push(callback);
          }
      }
docs: Add an event listener
  @param {Object} object
  @param {String} event       The name of an event, for example 'select'
  @param {function} callback  The callback method, called when the
  event takes place