Whenever any eventListener fires, we check the eventListener target and all parents for `onwhatever` properties and replace them with zone-bound functions - Chrome (for now)
322922
function patchViaCapturingAllTheEvents() {
    var _loop_1 = function (i) {
        var property = eventNames[i];
        var onproperty = 'on' + property;
        self.addEventListener(property, function (event) {
            var elt = event.target, bound, source;
            if (elt) {
                source = elt.constructor['name'] + '.' + onproperty;
            }
            else {
                source = 'unknown.' + onproperty;
            }
            while (elt) {
                if (elt[onproperty] && !elt[onproperty][unboundKey]) {
                    bound = Zone.current.wrap(elt[onproperty], source);
                    bound[unboundKey] = elt[onproperty];
                    elt[onproperty] = bound;
                }
                elt = elt.parentElement;
            }
        }, true);
    };
    for (var i = 0; i < eventNames.length; i++) {
        _loop_1(i);
    }
}
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');
                    }
                });
            }
        });
    });
}
808543
function patchUncaught() {
  var name = 'uncaughtException';
  var originalListener = process.listeners(name).pop();

  if (originalListener) {
    process.removeListener(name, originalListener);
  }

  return function() {
    if (!originalListener) return;
    process.on(name, originalListener);
  };
}
784503
function addEventListener(target, type, listener) {
    var onType, prevListener;

    // Modern browsers
    if (target.addEventListener) {
      return target.addEventListener(type, listener, false);
    }

    // Older browsers
    onType = 'on' + type;
    if (target.attachEvent) {
      target.attachEvent(onType, listener);
    } else if (target[onType]) {
      prevListener = target[onType];
      target[onType] = function() {
        listener();
        prevListener();
      };
    } else {
      target[onType] = listener;
    }
  }
46391
function (event, template) {
            // this.moduleCtrl.clearHighlight();
            this.data.overModuleCtrl = null;
            this.mouseOut(event);
            this._refreshModulesDisplay();
            // prevent propagation
            event.stopPropagation();
        }
350217
function eventHover ( event ) {

            var proposal = calcPointToPercentage(event.calcPoint);

            var to = scope_Spectrum.getStep(proposal);
            var value = scope_Spectrum.fromStepping(to);

            Object.keys(scope_Events).forEach(function( targetEvent ) {
                if ( 'hover' === targetEvent.split('.')[0] ) {
                    scope_Events[targetEvent].forEach(function( callback ) {
                        callback.call( scope_Self, value );
                    });
                }
            });
        }
1156891
function on(eventName, callback) {
  	if (objectType(eventName) !== "string") {
  		throw new TypeError("eventName must be a string when registering a listener");
  	} else if (!inArray(eventName, SUPPORTED_EVENTS)) {
  		var events = SUPPORTED_EVENTS.join(", ");
  		throw new Error("\"" + eventName + "\" is not a valid event; must be one of: " + events + ".");
  	} else if (objectType(callback) !== "function") {
  		throw new TypeError("callback must be a function when registering a listener");
  	}

  	if (!LISTENERS[eventName]) {
  		LISTENERS[eventName] = [];
  	}

  	// Don't register the same callback more than once
  	if (!inArray(callback, LISTENERS[eventName])) {
  		LISTENERS[eventName].push(callback);
  	}
  }
753625
function hasListener(listener,attr,func)
        {
          var _listeners = this.attrListeners();

          if(attr === 'html') attr = 'innerHTML';
          if(attr === 'events') attr = 'onclick';
          switch(listener)
          {
            case 'attr':
              if(typeof _listeners._attrListeners[attr] !== undefined)
              {
                if(loopListenerCheck(_listeners._attrListeners[attr],func)) return true;
              }
              else if(typeof _listeners._styleListeners[attr] !== undefined)
              {
                if(loopListenerCheck(_listeners._styleListeners[attr],func)) return true;
              }
              else if(typeof _listeners._parentAttrListeners[attr] !== undefined)
              {
                if(loopListenerCheck(_listeners._parentAttrListeners[attr],func)) return true;
              }
              else if(typeof _listeners._parentStyleListeners[attr] !== undefined)
              {
                if(loopListenerCheck(_listeners._parentStyleListeners[attr],func)) return true;
              }
            break;
            case 'attrupdate':
              if(typeof _listeners._attrUpdateListeners[attr] !== undefined)
              {
                if(loopListenerCheck(_listeners._attrUpdateListeners[attr],func)) return true;
              }
              else if(typeof _listeners._styleUpdateListeners[attr] !== undefined)
              {
                if(loopListenerCheck(_listeners._styleUpdateListeners[attr],func)) return true;
              }
              else if(typeof _listeners._parentAttrUpdateListeners[attr] !== undefined)
              {
                if(loopListenerCheck(_listeners._parentAttrUpdateListeners[attr],func)) return true;
              }
              else if(typeof _listeners._parentStyleUpdateListeners[attr] !== undefined)
              {
                if(loopListenerCheck(_listeners._parentStyleUpdateListeners[attr],func)) return true;
              }
            break;
          }
          return false;
        }
1077262
function _addEventListener() {
    _isAnimating = true;
    // If transition is not supported, call handler directly (IE9/OperaMini).
    if ( _transitionEndEvent ) {
      _dom.addEventListener( _transitionEndEvent,
                             _transitionCompleteBinded );
      this.trigger( BaseTransition.BEGIN_EVENT, { target: this } );
    } else {
      this.trigger( BaseTransition.BEGIN_EVENT, { target: this } );
      _transitionCompleteBinded();
    }
  }
819259
function (implementOn, event, callback) {
	var stringy = callback.toString();

	if (this._cached[stringy]) {

		// Iteratre through the cached callbacks and remove the correct one based on reference
		for(var i=0,numCbs=this._cached[stringy].length; i < numCbs; i++) {
			if (this._cached[stringy][i].raw === callback) {
				implementOn.removeEventListener(event, this._cached[stringy][i].fn);
			}
		}
	}
}
1366032
function (evt) {
            if (this._inOnBoundPropertyChange) {
                return;
            }
            if (evt.name == "update") {
                if (evt.properties["startDate"]) {
                    this.setProperty("startDate", this._subTplData.settings.startDate);
                }
            } else if (evt.name == "dateClick") {
                this.evalCallback(this._cfg.onclick, evt);
                if (!evt.cancelDefault) {
                    this.dateSelect(evt.date);
                }
            } else if (evt.name == "dateMouseOver") {
                this.evalCallback(this._cfg.onmouseover, evt);
            } else if (evt.name == "dateMouseOut") {
                this.evalCallback(this._cfg.onmouseout, evt);
            }
        }
839149
function(handlers) {
				var h;
						
				if (Basic.typeOf(handlers) !== 'array') {
					handlers = [handlers];
				}

				for (var i = 0; i < handlers.length; i++) {
					h = 'on' + handlers[i];
					
					if (Basic.typeOf(this[h]) === 'function') {
						this.addEventListener(handlers[i], this[h]);
					} else if (Basic.typeOf(this[h]) === 'undefined') {
						this[h] = null; // object must have defined event properties, even if it doesn't make use of them
					}
				}
			}
54960
function ( e ) {
            // Default context is `this` element
            var context = (selector ? matchElement( e.target, selector, true ) : this);

            // Handle `mouseenter` and `mouseleave`
            if ( event === "mouseenter" || event === "mouseleave" ) {
                var relatedElement = (event === "mouseenter" ? e.fromElement : e.toElement);

                if ( context && ( relatedElement !== context && !context.contains( relatedElement ) ) ) {
                    callback.call( context, e );
                }

            // Fire callback if context element
            } else if ( context ) {
                callback.call( context, e );
            }
        }
19541
function(e) {
		this._latestevent = e ? {
			type: e.type,
			value: e.target.value,
			checked: e.target.checked
		} : null;
	}
413095
function() {
		if (this._bindingState.parent === false && this._parentToChild === true) {
			var options = this._options;
			this._bindingState.parent = true;
			turnOnListeningAndUpdate(options.parent, options.child, this._updateChild, options.queue);
		}
	}
247763
function(argument, event_args, listener_args) {

		var value = this._style_bindings[listener_args.name].getValue() || '';
		if (this._is_inDOM) Firestorm.Element.setStyle(this.getDOMElement(), listener_args.name, value.toString().trim());

	}
735879
function EventListener(el, context) {
    this.context = context || null;

    this.el = el;

    this.events = {};

    this._onEvent = this._onEvent.bind(this);
}