       selector = "[#{eventName}]"
       for element in view[0].querySelectorAll(selector)
         do (element) ->
+          methodName = element.getAttribute(eventName)
           element = $(element)
-          methodName = element.attr(eventName)
           element.on eventName, (event) -> view[methodName](event, element)
 
       if view[0].webkitMatchesSelector(selector)
-        methodName = view.attr(eventName)
+        methodName = view[0].getAttribute(eventName)
         do (methodName) ->
           view.on eventName, (event) -> view[methodName](event, view)
 

  onDom = element.parents?('html').length > 0

  elementsWithHooks = []
  elementsWithHooks.push(element[0]) if element.attr?('callAttachHooks')
  if onDom
    for child in element[0].querySelectorAll('[callAttachHooks]')
      elementsWithHooks.push(child)

    jQuery.data(@[0], 'view', this)
    for element in @[0].getElementsByTagName('*')
      jQuery.data(element, 'view', this)
    @[0].setAttribute('callAttachHooks', true)
    step(this) for step in postProcessingSteps
    @initialize?(args...)

