src/event/events_core.js
function(eventName, handler, elem) {
  if (elem.addEventListener) {
    // Setting useCapture to true so that this virtual handler is always fired first
    // Also handles events that don't bubble correctly like focus/blur
    elem.addEventListener(eventName, handler, true);
  } else {
    elem.attachEvent('on' + eventName, handler);
  }
}
function(eventName, handler, elem) {
  if (elem.addEventListener) {
    // Setting useCapture to true so that this virtual handler is always fired first
    // Also handles events that don't bubble correctly like focus/blur
    elem.addEventListener(eventName, handler, true);
  } else {
    elem.attachEvent('on' + eventName, handler);
  }
}
function ( eventName , handler , elem ) { if ( elem . addEventListener ) { // Setting useCapture to true so that this virtual handler is always fired first // Also handles events that don't bubble correctly like focus/blur elem . addEventListener ( eventName , handler , true ) ; } else { elem . attachEvent ( 'on' + eventName , handler ) ; } }
Wrapper to add event listener
@param {String}   eventName Name of event to attach
@param {Function} handler   Function to bind
@param {Element}  elem      Element to bind to
Wrapper to add event listener