+debug = require('debug') 'kd:view'
 $ = require 'jquery'
 KD = require './kd'
 KDObject        = require './object'

    @domElement = $ el

    if @lazy
      # warn "lazyElement found with id #{domId}"
      @utils.defer => @emit 'viewAppended'

  setDomId:(id)->

      if shouldPrepend
      then @prepend subView, selector
      else @append subView, selector

    subView.on "ViewResized", -> subView.parentDidResize()

