       for ignored of ignoredAttributes
         delete classattributes[ignored]
 
+      # serialize the tag's contents
       body = el.innerHTML
+      # clear to prevent events from firing, e.g. onclick
       el.innerHTML = ''
 #      console.log('new class', name, classattributes)
       console.warn 'class exists, overwriting', name if name of lz

    constructor: (el, attributes = {}) ->
      @locked = true
      super(el, attributes)
      @parent.bind('subviews', @added)
      subviews = @parent.subviews
      if subviews
        for subview in subviews
          @added(subview)
      @locked = false
      @update()
      #console.log('layout', @parent, attributes)

    added: (child) =>
#      console.log 'added', child, @
      @update(child)

    update: (sender) ->

    setStyle: (name, value) ->
      value ?= ''
      name = stylemap[name] if name of stylemap
      # console.log('setStyle', name, value, @jqel[0])
      @jqel.css(name, value)
    set_parent: (parent) ->
      if parent instanceof Sprite
