callback = function(e) {
    'use strict';
    var listenerFn = goog.events.wrapListener(listener);
    var role = goog.dom.isElement(e.target) ?
        goog.a11y.aria.getRole(/** @type {!Element} */ (e.target)) :
        null;
    if (e.type == goog.events.EventType.CLICK && e.isMouseActionButton()) {
      listenerFn.call(opt_scope, e);
    } else if (
        (e.keyCode == goog.events.KeyCodes.ENTER ||
         e.keyCode == goog.events.KeyCodes.MAC_ENTER) &&
        e.type != goog.events.EventType.KEYUP) {
      // convert keydown to keypress for backward compatibility.
      e.type = goog.events.EventType.KEYPRESS;
      listenerFn.call(opt_scope, e);
    } else if (
        e.keyCode == goog.events.KeyCodes.SPACE &&
        (role == goog.a11y.aria.Role.BUTTON ||
         role == goog.a11y.aria.Role.TAB ||
         role == goog.a11y.aria.Role.RADIO)) {
      if (e.type == goog.events.EventType.KEYUP) {
        listenerFn.call(opt_scope, e);
      }
      // prevent the browser from scrolling the page down when space is pressed
      // on an interactive element.
      e.preventDefault();
    }
  }
Adds an event listener using the wrapper on a DOM Node or an object that has
implemented {@link goog.events.EventTarget}. A listener can only be added
once to an object.

@param {goog.events.ListenableType} target The target to listen to events on.
@param {function(?):?|{handleEvent:function(?):?}|null} listener Callback
    method, or an object with a handleEvent function.
@param {boolean=} opt_capt Whether to fire in capture phase (defaults to
    false).
@param {Object=} opt_scope Element in whose scope to call the listener.
@param {goog.events.EventHandler=} opt_eventHandler Event handler to add
    listener to.
@override