dist/ZeroClipboard.js
function(eventType, listener) {
    var i, len, foundIndex, events, perEventHandlers, client = this, meta = _clientMeta[client.id], handlers = meta && meta.handlers;
    if (!handlers) {
      return client;
    }
    if (arguments.length === 0) {
      events = _keys(handlers);
    } else if (typeof eventType === "string" && eventType) {
      events = eventType.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.off(key, listener);
        }
      });
    }
    if (events && events.length) {
      for (i = 0, len = events.length; i < len; i++) {
        eventType = events[i].toLowerCase().replace(/^on/, "");
        perEventHandlers = handlers[eventType];
        if (perEventHandlers && perEventHandlers.length) {
          if (listener) {
            foundIndex = perEventHandlers.indexOf(listener);
            while (foundIndex !== -1) {
              perEventHandlers.splice(foundIndex, 1);
              foundIndex = perEventHandlers.indexOf(listener, foundIndex);
            }
          } else {
            perEventHandlers.length = 0;
          }
        }
      }
    }
    return client;
  }
function(eventType, listener) {
    var i, len, foundIndex, events, perEventHandlers, client = this, meta = _clientMeta[client.id], handlers = meta && meta.handlers;
    if (!handlers) {
      return client;
    }
    if (arguments.length === 0) {
      events = _keys(handlers);
    } else if (typeof eventType === "string" && eventType) {
      events = eventType.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.off(key, listener);
        }
      });
    }
    if (events && events.length) {
      for (i = 0, len = events.length; i < len; i++) {
        eventType = events[i].toLowerCase().replace(/^on/, "");
        perEventHandlers = handlers[eventType];
        if (perEventHandlers && perEventHandlers.length) {
          if (listener) {
            foundIndex = perEventHandlers.indexOf(listener);
            while (foundIndex !== -1) {
              perEventHandlers.splice(foundIndex, 1);
              foundIndex = perEventHandlers.indexOf(listener, foundIndex);
            }
          } else {
            perEventHandlers.length = 0;
          }
        }
      }
    }
    return client;
  }
function ( eventType , listener ) { var i , len , foundIndex , events , perEventHandlers , client = this , meta = _clientMeta [ client . id ] , handlers = meta && meta . handlers ; if ( ! handlers ) { return client ; } if ( arguments . length === 0 ) { events = _keys ( handlers ) ; } else if ( typeof eventType === "string" && eventType ) { events = eventType . 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 . off ( key , listener ) ; } } ) ; } if ( events && events . length ) { for ( i = 0 , len = events . length ; i < len ; i ++ ) { eventType = events [ i ] . toLowerCase ( ) . replace ( / ^on / , "" ) ; perEventHandlers = handlers [ eventType ] ; if ( perEventHandlers && perEventHandlers . length ) { if ( listener ) { foundIndex = perEventHandlers . indexOf ( listener ) ; while ( foundIndex !== - 1 ) { perEventHandlers . splice ( foundIndex , 1 ) ; foundIndex = perEventHandlers . indexOf ( listener , foundIndex ) ; } } else { perEventHandlers . length = 0 ; } } } } return client ; }
The underlying implementation of `ZeroClipboard.Client.prototype.off`.
@private
The underlying implementation of ZeroClipboard . Client . prototype . off .