Using local functions instead of anonymous for event handler
14690
function listenHandler( event ) {
				var handler = rawHandler.apply( this, arguments );
				if ( handler === false) {
					event.stopPropagation();
					event.preventDefault();
				}
				return( handler );
		}
665380
function handleFunction(fn, scope, thisVal) {
  var localScope = fn.node && fn.node.getAnnotation("scope") ? fn.node.getAnnotation("scope") : new Scope(scope);
  localScope.declare('__return');
  if(fn.node) {
    fn.node.setAnnotation("scope", localScope);
    fn.node.rewrite('Function(name, fargs, body)', function(b) {
      b.fargs.forEach(function(farg) {
        localScope.declare(farg.value);
        localScope.hint(farg.value, new Value());
      });
      localScope.declare('__this');
      localScope.hint('__this', thisVal);
      inferAllTypes(localScope, b.body);
      return this;
    });
  } else if(fn.returnValue) {
    localScope.hint('__return', fn.returnValue);
  }
  return localScope;
}
660925
function(eventName, eventHandler) {
      var stack = this.actual.data("events")[eventName];
      var i;
      for (i = 0; i < stack.length; i++) {
        if (stack[i].handler == eventHandler) {
          return true;
        }
      }
      return false;
    }
52406
function ( eventName, handler ) {
        var events = this.events[ eventName ],
            handlers = [],
            i;
        if ( !events ) {
            return;
        }
        if ( $.isArray( events ) ) {
            for ( i = 0; i < events.length; i++ ) {
                if ( events[i].handler !== handler ) {
                    handlers.push( events[ i ] );
                }
            }
            this.events[ eventName ] = handlers;
        }
    }
360208
function(handlers){
      _.each(handlers, function(handler, name){
        var context = null;

        if (_.isObject(handler) && !_.isFunction(handler)){
          context = handler.context;
          handler = handler.callback;
        }

        this.setHandler(name, handler, context);
      }, this);
    }
779039
function(event, handler) {
    return events.on({
      listeners: this._listeners,
      event: event,
      handler: handler
    });
  }
1260591
function changeHandler(eventOptions = {}) {
    const { key, silent } = eventOptions;
    const def = defs.get(this);

    if (key && key in def.keys && !silent) {
        triggerOne(this, 'set', eventOptions);
        triggerOne(this, 'modify', eventOptions);
    }
}
1357955
function eventHandler(trackedElements = {}, options = { tolerance: 0 }) {
    const selectors = Object.keys(trackedElements);
    let testVisibility;

    if (!selectors.length) return;

    if (options.container === window) {
        testVisibility = inViewport;
    } else {
        testVisibility = inContainer;
    }

    selectors.forEach((selector) => {
        trackedElements[selector].nodes.forEach((item) => {
            if (testVisibility(item.node, options)) {
                item.wasVisible = item.isVisible;
                item.isVisible = true;
            } else {
                item.wasVisible = item.isVisible;
                item.isVisible = false;
            }
            if (item.isVisible === true && item.wasVisible === false) {
                if (!trackedElements[selector].enter) return;

                Object.keys(trackedElements[selector].enter).forEach((callback) => {
                    if (typeof trackedElements[selector].enter[callback] === 'function') {
                        trackedElements[selector].enter[callback](item.node, 'enter');
                    }
                });
            }
            if (item.isVisible === false && item.wasVisible === true) {
                if (!trackedElements[selector].leave) return;

                Object.keys(trackedElements[selector].leave).forEach((callback) => {
                    if (typeof trackedElements[selector].leave[callback] === 'function') {
                        trackedElements[selector].leave[callback](item.node, 'leave');
                    }
                });
            }
        });
    });
}
238895
function listenersHelp (element, events, handler, method) {
  let list = events.split(' ')
  for (let i = 0, len = list.length; i < len; i++) {
    let item = list[i]
    if (method === false) {
      element.removeEventListener(item, handler)
    } else {
      element.addEventListener(item, handler, false)
    }
  }
}
1213452
function(event){
        if (typeof event == "string"){
            event = { type: event };
        }
        if (!event.target){
            event.target = this;
        }

        if (!event.type){
            throw new Error("Event object missing 'type' property.");
        }

        if (this._handlers[event.type] instanceof Array){
            var handlers = this._handlers[event.type];
            for (var i=0, len=handlers.length; i < len; i++){
                handlers[i].call(this, event);
            }
        }
    }
1286012
function delegateHandler(evt, selector, handler) {
    const scopeSelector = `[${randomID}="${randomID}"] `;
    const splittedSelector = selector.split(',');

    let matching = '';

    for (let i = 0; i < splittedSelector.length; i++) {
        const sel = splittedSelector[i];
        matching += `${i === 0 ? '' : ','}${scopeSelector}${sel},${scopeSelector}${sel} *`;
    }


    this.setAttribute(randomID, randomID);

    if (is(evt.target, matching)) {
        handler.call(this, evt);
    }

    this.removeAttribute(randomID);
}
845743
def on_button(callback, args=(), buttons=(LEFT, MIDDLE, RIGHT, X, X2), types=(UP, DOWN, DOUBLE)):
    
    if not isinstance(buttons, (tuple, list)):
        buttons = (buttons,)
    if not isinstance(types, (tuple, list)):
        types = (types,)

    def handler(event):
        if isinstance(event, ButtonEvent):
            if event.event_type in types and event.button in buttons:
                callback(*args)
    _listener.add_handler(handler)
    return handler
374257
function (event) {
            var own = this;
            var returnValue = true;
            // grab the event object (IE uses a global event object)
            event = event || own._fixEvent(((this.ownerDocument || this.document || this).parentWindow || window).event);
            // get a reference to the hash table of event handlers
            var handlers = this.events[event.type];
            // execute each event handler
            for (var i in handlers) {
                var _handleEvent = handlers[i];
                if (_handleEvent(event) === false) {
                    returnValue = false;
                }
            }
            return returnValue;
        }
1362937
function EventLoop() {
    var renderCallbacks = [],
        intervalId,
        startInternal = function () {
            intervalId = requestAnimationFrame(startInternal);
            for (var i = 0, n = renderCallbacks.length; i < n; ++i) {
                renderCallbacks[i]();
            }
        };

    this.onRender = function (callback) {
        if (typeof callback === 'function') {
            renderCallbacks.push(callback);
        }
    };
    this.start = function () {
        startInternal();
    };
    this.stop = function () {
        if (intervalId) {
            cancelAnimationFrame(intervalId);
            intervalId = null;
        }
    };
}
662327
public static OnJqueryFunction on(final Attr events, JavaScriptInlineFunction handler) {
        return new OnJqueryFunction(events, Attr.nullValue(), null, handler);
    }
76879
function genWeexHandler (params, handlerCode) {
  var innerHandlerCode = handlerCode;
  var exps = params.filter(function (exp) { return simplePathRE.test(exp) && exp !== '$event'; });
  var bindings = exps.map(function (exp) { return ({ '@binding': exp }); });
  var args = exps.map(function (exp, i) {
    var key = "$_" + (i + 1);
    innerHandlerCode = innerHandlerCode.replace(exp, key);
    return key
  });
  args.push('$event');
  return '{\n' +
    "handler:function(" + (args.join(',')) + "){" + innerHandlerCode + "},\n" +
    "params:" + (JSON.stringify(bindings)) + "\n" +
    '}'
}
497188
function( object, callback, args ) {
		var name, i = 0,
			length = object.length,
			isObj = length === undefined || jQuery.isFunction(object);

		if ( args ) {
			if ( isObj ) {
				for ( name in object ) {
					if ( callback.apply( object[ name ], args ) === false ) {
						break;
					}
				}
			} else {
				for ( ; i < length; ) {
					if ( callback.apply( object[ i++ ], args ) === false ) {
						break;
					}
				}
			}

		// A special, fast, case for the most common use of each
		} else {
			if ( isObj ) {
				for ( name in object ) {
					if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
						break;
					}
				}
			} else {
				for ( var value = object[0];
					i < length && callback.call( value, i, value ) !== false; value = object[++i] ) {}
			}
		}

		return object;
	}