   # 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]
 

    @started = yes

    if 'onhashchange' of window
      Batman.DOM.addEventListener window, 'hashchange', @parseHash
    else
      @interval = setInterval @parseHash, 100


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

# `$addEventListener uses attachEvent when necessary
Batman.DOM.addEventListener = $addEventListener = 
  if window?.addEventListener then ((node, eventName, callback) -> node.addEventListener eventName, callback, false)
  else ((node, eventName, callback) -> node.attachEvent "on#{eventName}", callback)

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