code: function event(eventName, callingFunction) {
          if (typeof eventName !== 'string') {
              self.showError(self.errCodes.DEVELOPER_ERR, callingFunction + " called without a string as the first argument");
              throw "developer error";
          }
          if (!allowedEvents[eventName]) {
              self.showError(self.errCodes.DEVELOPER_ERR, callingFunction + " called with a bad event name = " + eventName);
              throw "developer error";
          }
      }
docs: This function checks if an attempt was made to add an event listener or
  or emit an unlisted event, since such is typically a typo.
  @private
  @param {String} eventName
  @param {String} callingFunction the name of the calling function.