   onDom = element.parents?('html').length > 0
 
   elementsWithHooks = []
-  elementsWithHooks.push(element[0]) if element.attr?('callAttachHooks')
+  elementsWithHooks.push(element[0]) if element[0].getAttribute('callAttachHooks')
   if onDom
     for child in element[0].querySelectorAll('[callAttachHooks]')
       elementsWithHooks.push(child)


  wireOutlets: (view) ->
    for element in view[0].querySelectorAll('[outlet]')
      element = $(element)
      outlet = element.attr('outlet')
      view[outlet] = element
      element.attr('outlet', null)

    undefined


    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...)

