dist/ZeroClipboard.js
function(eventType, listener) {
    var i, len, events, added = {}, client = this, meta = _clientMeta[client.id], handlers = meta && meta.handlers;
    if (!meta) {
      throw new Error("Attempted to add new listener(s) to a destroyed ZeroClipboard client instance");
    }
    if (typeof eventType === "string" && eventType) {
      events = eventType.toLowerCase().split(/\s+/);
    } else if (typeof eventType === "object" && eventType && !("length" in eventType) && typeof listener === "undefined") {
      _keys(eventType).forEach(function(key) {
        var listener = eventType[key];
        if (typeof listener === "function") {
          client.on(key, listener);
        }
      });
    }
    if (events && events.length && listener) {
      for (i = 0, len = events.length; i < len; i++) {
        eventType = events[i].replace(/^on/, "");
        added[eventType] = true;
        if (!handlers[eventType]) {
          handlers[eventType] = [];
        }
        handlers[eventType].push(listener);
      }
      if (added.ready && _flashState.ready) {
        this.emit({
          type: "ready",
          client: this
        });
      }
      if (added.error) {
        for (i = 0, len = _flashStateErrorNames.length; i < len; i++) {
          if (_flashState[_flashStateErrorNames[i].replace(/^flash-/, "")]) {
            this.emit({
              type: "error",
              name: _flashStateErrorNames[i],
              client: this
            });
            break;
          }
        }
        if (_zcSwfVersion !== undefined && ZeroClipboard.version !== _zcSwfVersion) {
          this.emit({
            type: "error",
            name: "version-mismatch",
            jsVersion: ZeroClipboard.version,
            swfVersion: _zcSwfVersion
          });
        }
      }
    }
    return client;
  }
function(eventType, listener) {
    var i, len, events, added = {}, client = this, meta = _clientMeta[client.id], handlers = meta && meta.handlers;
    if (!meta) {
      throw new Error("Attempted to add new listener(s) to a destroyed ZeroClipboard client instance");
    }
    if (typeof eventType === "string" && eventType) {
      events = eventType.toLowerCase().split(/\s+/);
    } else if (typeof eventType === "object" && eventType && !("length" in eventType) && typeof listener === "undefined") {
      _keys(eventType).forEach(function(key) {
        var listener = eventType[key];
        if (typeof listener === "function") {
          client.on(key, listener);
        }
      });
    }
    if (events && events.length && listener) {
      for (i = 0, len = events.length; i < len; i++) {
        eventType = events[i].replace(/^on/, "");
        added[eventType] = true;
        if (!handlers[eventType]) {
          handlers[eventType] = [];
        }
        handlers[eventType].push(listener);
      }
      if (added.ready && _flashState.ready) {
        this.emit({
          type: "ready",
          client: this
        });
      }
      if (added.error) {
        for (i = 0, len = _flashStateErrorNames.length; i < len; i++) {
          if (_flashState[_flashStateErrorNames[i].replace(/^flash-/, "")]) {
            this.emit({
              type: "error",
              name: _flashStateErrorNames[i],
              client: this
            });
            break;
          }
        }
        if (_zcSwfVersion !== undefined && ZeroClipboard.version !== _zcSwfVersion) {
          this.emit({
            type: "error",
            name: "version-mismatch",
            jsVersion: ZeroClipboard.version,
            swfVersion: _zcSwfVersion
          });
        }
      }
    }
    return client;
  }
function ( eventType , listener ) { var i , len , events , added = { } , client = this , meta = _clientMeta [ client . id ] , handlers = meta && meta . handlers ; if ( ! meta ) { throw new Error ( "Attempted to add new listener(s) to a destroyed ZeroClipboard client instance" ) ; } if ( typeof eventType === "string" && eventType ) { events = eventType . toLowerCase ( ) . split ( / \s+ / ) ; } else if ( typeof eventType === "object" && eventType && ! ( "length" in eventType ) && typeof listener === "undefined" ) { _keys ( eventType ) . forEach ( function ( key ) { var listener = eventType [ key ] ; if ( typeof listener === "function" ) { client . on ( key , listener ) ; } } ) ; } if ( events && events . length && listener ) { for ( i = 0 , len = events . length ; i < len ; i ++ ) { eventType = events [ i ] . replace ( / ^on / , "" ) ; added [ eventType ] = true ; if ( ! handlers [ eventType ] ) { handlers [ eventType ] = [ ] ; } handlers [ eventType ] . push ( listener ) ; } if ( added . ready && _flashState . ready ) { this . emit ( { type : "ready" , client : this } ) ; } if ( added . error ) { for ( i = 0 , len = _flashStateErrorNames . length ; i < len ; i ++ ) { if ( _flashState [ _flashStateErrorNames [ i ] . replace ( / ^flash- / , "" ) ] ) { this . emit ( { type : "error" , name : _flashStateErrorNames [ i ] , client : this } ) ; break ; } } if ( _zcSwfVersion !== undefined && ZeroClipboard . version !== _zcSwfVersion ) { this . emit ( { type : "error" , name : "version-mismatch" , jsVersion : ZeroClipboard . version , swfVersion : _zcSwfVersion } ) ; } } } return client ; }
The underlying implementation of `ZeroClipboard.Client.prototype.on`.
@private
The underlying implementation of ZeroClipboard . Client . prototype . on .