         name = name.substr(2)
         # console.log 'installing handler', name, args, type, script, @
         @bind(name, @eventCallback(name, script, @, args, type))
-        # installMethod(@, methodname, method)
       delete attributes.$handlers
 
       # Bind to event expressions and set attributes

    @include Events

    constructor: (el, attributes = {}) ->
      # Install types
      @types = attributes.$types ? {}
      delete attributes.$types

      # Install methods
      for methodname, method of attributes.$methods
        installMethod(@, methodname, method)
      delete attributes.$methods


  ignoredAttributes = {parent: true, id: true, name: true, extends: true, type: true}
  class View extends Node
    constructor: (el, attributes = {}) ->
      @subviews = []
      attributes.$types = {x: 'number', y: 'number', width: 'number', height: 'number'}
      if (el instanceof HTMLElement and el.$view)
        console.warn 'already bound view', el.$view, el
