   # DOM directives, but are used to handle specific events by the `data-event-#{name}` helper.
   events: {
     click: (node, callback) ->
-      Batman.DOM.addEventListener node, 'click', (args...) ->
+      $addEventListener node, 'click', (args...) ->
         callback node, args...
         $preventDefault args[0]
 

        if isSetting then (node.innerHTML = value) else node.innerHTML
  nodeIsEditable: (node) ->
    node.nodeName.toUpperCase() in ['INPUT', 'TEXTAREA', 'SELECT']

  addEventListener: (node, eventName, callback) ->
    if node.addEventListener
      node.addEventListener eventName, callback, false
    else
      node.attachEvent "on#{eventName}", callback
}


# `$removeEventListener` uses detachEvent when necessary
Batman.DOM.removeEventListener = $removeEventListener =

        else ['change']

      for eventName in eventNames
        $addEventListener node, eventName, (args...) ->
          callback node, args...

    submit: (node, callback) ->
      if Batman.DOM.nodeIsEditable(node)
        $addEventListener node, 'keyup', (args...) ->
          if args[0].keyCode is 13 || args[0].which is 13 || args[0].keyIdentifier is 'Enter' || args[0].key is 'Enter'
            callback node, args...
            $preventDefault args[0]
      else
        $addEventListener node, 'submit', (args...) ->
          callback node, args...
          $preventDefault args[0]

