为元素解除已绑定方法
@param element
@param type
@param handler
@returns {*}
489549
function (element, type, handler) {
            var own = this;
            //非DOM元素不处理 handler 非function 不处理
            if (!(1 == element.nodeType || element.nodeType == 9 || element === window) || !vQ.isFunction(handler)) {
                return;
            }

            //批量事件绑定
            if (vQ.isArray(type)) {
                return own._handleMultipleEvents(own.remove, element, type, handler);
            }
            //处理绑定了了context的事件
            var _handler = own._contextHandler[handler.$$guid];// || handler;

            //调用原生方法解除已绑定事件
            if (element.removeEventListener) {
                element.removeEventListener(type, _handler || handler, false);
            } else {
                //IE等 自行托管事件

                // delete the event handler from the hash table
                var events = element.events;
                if (events) {
                    delete events[handler.$$guid];//删除该方法
                    //判断事件集合是否为空
                    var hasProp = false;
                    for (var prop in events) {
                        hasProp = true;
                    }
                    if (!hasProp) {
                        delete element.events;
                    }
                }
            }
            if (_handler && !delete own._contextHandler[handler.$$guid]) {
                own._contextHandler[handler.$$guid] = null;
            }
        }
1299602
function registerValueHandler (handlers, type, handler) {
  let typeofType = typeof type;

  if (typeofType !== 'function' && typeofType !== 'string') {
    throw new Error("type must be a class constructor or string");
  }

  if (typeof handler !== 'function') {
    throw new Error("handler must be a function");
  }

  for (let typeHandler of handlers) {
    if (typeHandler.type === type) {
      typeHandler.handler = handler;

      return;
    }
  }

  handlers.push({
    type: type,
    handler: handler,
  });
}
1216651
function addHandler(node, eventType, handler, thisObject){
    node = getNode(node);

    if (!node)
      throw 'basis.event.addHandler: can\'t attach event listener to undefined';

    if (typeof handler != 'function')
      throw 'basis.event.addHandler: handler is not a function';

    var handlers = node === global ? globalEvents : node[EVENT_HOLDER];

    if (!handlers)
      handlers = node[EVENT_HOLDER] = {};

    var eventTypeHandlers = handlers[eventType];
    var handlerObject = {
      handler: handler,
      thisObject: thisObject
    };

    if (!eventTypeHandlers)
    {
      eventTypeHandlers = handlers[eventType] = [handlerObject];
      eventTypeHandlers.fireEvent = function(event){ // closure
        // simulate capture phase for old browsers
        event = wrap(event);
        if (noCaptureScheme && event && globalHandlers[eventType])
        {
          if (typeof event.returnValue == 'undefined')
          {
            observeGlobalEvents(event);
            if (event.cancelBubble === true)
              return;
            if (typeof event.returnValue == 'undefined')
              event.returnValue = true;
          }
        }

        startFrame(event);

        // call eventType handlers
        for (var i = 0, wrappedEvent = new Event(event), item; item = eventTypeHandlers[i++];)
          item.handler.call(item.thisObject, wrappedEvent);

        finishFrame(event);
      };

      if (W3CSUPPORT)
        // W3C DOM event model
        node.addEventListener(eventType, eventTypeHandlers.fireEvent, false);
      else
        // old IE event model
        node.attachEvent('on' + eventType, eventTypeHandlers.fireEvent);
    }
    else
    {
      // check for duplicates, exit if found
      for (var i = 0, item; item = eventTypeHandlers[i]; i++)
        if (item.handler === handler && item.thisObject === thisObject)
          return;

      // add only unique handlers
      eventTypeHandlers.push(handlerObject);
    }
  }
378232
function(element, type, handler) {
    var types = type.split(' ');
    Hammer.utils.each(types, function(type){
      element.addEventListener(type, handler, false);
    });
  }
806782
function unbindEvent(element, type, handler) {
    const events = safeEvent(element, type);
    const items = events.get(handler);

    if (!items) {
        return;
    }

    forgetHandler(element, type, handler);

    util.forEach(items, func => {
        if ('removeEventListener' in element) {
            element.removeEventListener(type, func);
        } else if ('detachEvent' in element) {
            element.detachEvent(`on${type}`, func);
        }
    });
}
1273601
def _get_handler(self, handler_class):
        """"""
        element = None
        for handler in self.handlers:
            if isinstance(handler, handler_class):
                element = handler
                break
        return element
585606
function (element, type, handler, context) {
            var own = this;
            //非Dom元素不处理
            if (!(1 == element.nodeType || element.nodeType == 9 || element === window)|| !vQ.isFunction(handler)) {
                return;
            }
            //获取传入参数
            var args = slice.call(arguments);

            //批量绑定事件处理
            if (vQ.isArray(type)) {
                return own._handleMultipleEvents.apply(own, [own.one].concat(args));
                //return own._handleMultipleEvents(own.one, element, type, handler);
            }

            var func = function () {
                own.unbind(element, type, func);
                handler.apply(context || element, arguments);
            };

            // copy the guid to the new function so it can removed using the original function's ID
            func.$$guid = handler.$$guid = handler.$$guid || own._guid++;
            own.bind(element, type, func);


            //var func = function(){
            //    own.unbind.apply(own,args);
            //    handler.apply(context || element, arguments);
            //};
            ////args = [type, func].concat(args.slice(2));//更换fun 这样支持不定个数的参数
            //
            //// copy the guid to the new function so it can removed using the original function's ID
            //func.$$guid = handler.$$guid = handler.$$guid || own._guid++;
            ////own.observe(element, type, func);
            //own.bind.apply(own,args);
        }
920675
function (eventType, handler) {
		var svgElement = this,
			element = svgElement.element;
		
		// touch
		if (hasTouch && eventType === 'click') {
			element.ontouchstart = function (e) {			
				svgElement.touchEventFired = Date.now();				
				e.preventDefault();
				handler.call(element, e);
			};
			element.onclick = function (e) {												
				if (userAgent.indexOf('Android') === -1 || Date.now() - (svgElement.touchEventFired || 0) > 1100) { // #2269
					handler.call(element, e);
				}
			};			
		} else {
			// simplest possible event model for internal use
			element['on' + eventType] = handler;
		}
		return this;
	}
1198958
function (type, handler) {

            // Validate arguments
            if (typeof type !== 'string') {
                throw new Error('Type must be a string');
            }
            if (typeof handler !== 'function') {
                throw new Error('Handler must be a function');
            }

            // Check for presence of event store
            if (!this._events) {
                this._events = {};
            }
            if (!this._events[type]) {
                this._events[type] = [];
            }

            // Add handler
            this._events[type].push(handler);

        }
483537
function(types, handler) {
		types.forEach(function(Type) {
			gui.Array.remove(this._watches, Type);
			gui.Array.remove(this._needing, Type);
			this._removechecks(Type.$classid, [handler]);
			if (!this._watches.length) {
				this._subscribe(false);
			}
		}, this);
	}
1115664
function() {
			if (!this._attached) {

				forEachEventType(this._eventTypes, this._handler, function(eventType) {
					var that = this;

					function handleEvent() {
						that._handleEvent.apply(that, arguments);
					}

					Box.DOM.on(this.element, eventType, handleEvent);

					this._boundHandler[eventType] = handleEvent;
				}, this);

				this._attached = true;
			}
		}
398102
function( type, handler ) {

      if( handler === void 0 || handler === null )
        throw new Error( 'Missing argument "handler"' )

      if( typeof handler !== 'function' && typeof handler.handleEvent !== 'function' )
        throw new TypeError( 'Handler must be a function.' )

      function wrapper() {
        this.removeListener( type, wrapper )
        typeof handler !== 'function'
          ? handler.handleEvent.apply( handler, arguments )
          : handler.apply( this, arguments )
      }

      this._events[ type ] ?
        this._events[ type ].push( wrapper ) :
        this._events[ type ] = [ wrapper ]

      return this

    }
119520
function (handler) {
            this.cleanCache();

            // initialization of delegation manager
            if (!this.__delegateMapping) {
                ariaUtilsAriaWindow.attachWindow();

                var body = Aria.$window.document.body;
                this.rootListener = ariaCoreBrowser.isOldIE ? body : Aria.$window;
                this.__delegateMapping = {};
                var utilEvent = ariaUtilsEvent, index, l;
                for (index = 0, l = this.delegatedOnBody.length; index < l; index++) {
                    utilEvent.addListener(body, this.delegatedOnBody[index], {
                        fn : this.delegate,
                        scope : this
                    });
                }
                for (index = 0, l = this.delegatedOnWindow.length; index < l; index++) {
                    utilEvent.addListener(this.rootListener, this.delegatedOnWindow[index], {
                        fn : this.delegate,
                        scope : this
                    });
                }
            }
            var id = this.__idMgr.getId();
            while (this._changed && this._changed[id]) {
                this._changed[id] = false;
                id = this.__idMgr.getId();
            }
            this.__delegateMapping[id] = new ariaUtilsCallback(handler);
            return id;
        }
986049
@SuppressWarnings("unchecked")
    public static <T extends Element> List<T> elements(Class<T> type, Locator locator) {
        if (!type.isInterface()) {
            throw new IllegalArgumentException("Element type must be an interface, was: " + type);
        }

        InvocationHandler invocationHandler = new ElementListHandler(type, locator);

        return (List<T>) Proxy.newProxyInstance(Elements.class.getClassLoader(),
                new Class[] { List.class, HasElementContext.class },
                invocationHandler);
    }
476060
function(type, handler) {

			var handlers = this._handlers[type],
				i,
				len;

			if (typeof handlers === 'undefined') {
				handlers = this._handlers[type] = [];
			}

			for (i = 0, len = handlers.length; i < len; i++) {
				if (handlers[i] === handler) {
					// prevent duplicate handlers
					return;
				}
			}

			handlers.push(handler);
		}
672612
function (value) {
        var handler = Variable.types[this.type] || Variable.types.any;
        return _.isFunction(handler) ? handler(value) : handler.in(value);
    }
1035368
function (id, type, elem) {
            var self = this;
            $.each(elem.options.eventHandlers, function (event) {
                if (self.customEventHandlers[event] === undefined) self.customEventHandlers[event] = {};
                if (self.customEventHandlers[event][type] === undefined) self.customEventHandlers[event][type] = {};
                self.customEventHandlers[event][type][id] = elem;
            });
        }