 
       for listener in listeners
         break if immediatePropagationStopped
-        listener.callback.call(currentTarget, syntheticEvent)
+        listener.callback.call(currentTarget, dispatchedEvent)
 
       break if currentTarget is window
       break if propagationStopped

  # * `commandName` {String} indicating the name of the command to dispatch.
  dispatch: (target, commandName, detail) ->
    event = new CustomEvent(commandName, {bubbles: true, detail})
    eventWithTarget = Object.create {},
      target: value: target
      preventDefault: value: ->
      stopPropagation: value: ->
      stopImmediatePropagation: value: ->
    # NOTE: In Chrome 43, Object.create doesn't work well with CustomEvent;
    # However utilizing _.defaults here doesn't really do anything since all properties have been
    # moved from "own" to the prototype, so we should update this to fully shadowing the properties
    # from Event.prototype (+ detail property from CustomEvent).
    eventWithTarget = _.defaults(eventWithTarget, event)
    @handleCommandEvent(eventWithTarget)

  # Public: Invoke the given callback before dispatching a command event.
  #

      @selectorBasedListenersByCommandName[commandName] = listeners.slice()
    return

  handleCommandEvent: (event) =>
    propagationStopped = false
    immediatePropagationStopped = false
    matched = false
    currentTarget = event.target
    {preventDefault, stopPropagation, stopImmediatePropagation, abortKeyBinding} = event

    dispatchedEvent = new CustomEvent(event.type, {bubbles: true, detail: event.detail})
    Object.defineProperty dispatchedEvent, 'eventPhase', value: Event.BUBBLING_PHASE
    Object.defineProperty dispatchedEvent, 'currentTarget', get: -> currentTarget
    Object.defineProperty dispatchedEvent, 'target', value: currentTarget
    Object.defineProperty dispatchedEvent, 'preventDefault', value: ->
      event.preventDefault()
    Object.defineProperty dispatchedEvent, 'stopPropagation', value: ->
      event.stopPropagation()
      propagationStopped = true
    Object.defineProperty dispatchedEvent, 'stopImmediatePropagation', value: ->
      event.stopImmediatePropagation()
      propagationStopped = true
      immediatePropagationStopped = true
    Object.defineProperty dispatchedEvent, 'abortKeyBinding', value: ->
      event.abortKeyBinding?()

    @emitter.emit 'will-dispatch', dispatchedEvent

    loop
      listeners = @inlineListenersByCommandName[event.type]?.get(currentTarget) ? []
      if currentTarget.webkitMatchesSelector?
        selectorBasedListeners =
          (@selectorBasedListenersByCommandName[event.type] ? [])
            .filter (listener) -> currentTarget.webkitMatchesSelector(listener.selector)
            .sort (a, b) -> a.compare(b)
        listeners = listeners.concat(selectorBasedListeners)
