       if contents.constructor isnt Array
         contents = [contents]
       for child in contents
-        view.appendChild @render child
+        view.appendChild @render child, opts
     view
 
   html: ({content}) ->

getlazy = client.import 'getlazy'

module.exports = views =
  dom: ({tag, attrs, contents}) ->
    view = document.createElement tag
    for k, v of attrs
      if v instanceof Array then v = v.join ' '

    number:  (a...) -> views.number a...
    code:    (a...) -> views.code a...

  render: (data, opts = {}) ->
    if @views.hasOwnProperty(data.type)
      @views[data.type](data, opts)
    else if data?.constructor is String
      new Text data
    else
