 class Batman.DOM.ViewBinding extends Batman.DOM.AbstractBinding
   constructor: ->
     super
-    @renderer.prevent('rendered')
-    @node.removeAttribute "data-view"
+    @renderer.prevent 'rendered'
+    @node.removeAttribute 'data-view'
 
   dataChange: (viewClassOrInstance) ->
     return unless viewClassOrInstance?

        node: @node
        context: @renderContext

    @view.on 'ready', => @renderer.allowAndFire 'rendered'

    @die()


    super

  dataChange: (value) ->
    if !!value is not @invert
      view = Batman.data @node, 'view'
      view?.viewWillAppear? @node

      Batman.data(@node, 'show')?.call(@node)
      @node.style.display = @originalDisplay

      view?.viewDidAppear? @node
    else
      view = Batman.data @node, 'view'
      view?.viewWillDisappear? @node

      if typeof (hide = Batman.data(@node, 'hide')) is 'function'
        hide.call @node
      else
        $setStyleProperty(@node, 'display', 'none', 'important')
      
      view?.viewDidDisappear? @node

class Batman.DOM.CheckedBinding extends Batman.DOM.NodeAttributeBinding
  dataChange: (value) ->
