on(event, handler) {
    if (this._options.allowedEvents.indexOf(event) !== -1) {
      this._transport.bind(event, handler);
    }

    return this;
  }
/**
   * Simple proxy method for binding events
   *
   * @param {String} event The name of the event to bind
   * @param {Function} handler The function to bind to the event
   * @returns {PBSMessageAPI}
   */
Simple proxy method for binding events
@param {String} event The name of the event to bind
@param {Function} handler The function to bind to the event
@returns {PBSMessageAPI}
Simple proxy method for binding events @param { String } event The name of the event to bind @param { Function } handler The function to bind to the event @returns { PBSMessageAPI }
on(event, handler) {
    if (this._options.allowedEvents.indexOf(event) !== -1) {
      this._transport.bind(event, handler);
    }
    return this;
  }
on ( event , handler ) { if ( this . _options . allowedEvents . indexOf ( event ) !== - 1 ) { this . _transport . bind ( event , handler ) ; } return this ; }
Simple proxy method for binding events
 @param {String} event The name of the event to bind
 @param {Function} handler The function to bind to the event
 @returns {PBSMessageAPI}
Simple proxy method for binding events @param { String } event The name of the event to bind @param { Function } handler The function to bind to the event @returns { PBSMessageAPI }