   else
     [tag, id, classes] = parseTagSpec(tagSpecOrEl)
     el = doc.createElement(tag)
-    element.setAttr(el, 'id', id) if id
-    element.setAttr(el, 'className', classes.join(' ')) if classes.length
+    exports.setAttr(el, 'id', id) if id
+    exports.setAttr(el, 'className', classes.join(' ')) if classes.length
 
   if children.length
     exports.setAttr(el, 'html', children)

    el.appendChild(fragment)


@el.getAttr = (el, attr) ->
  directAttr = directAttributes[attr]
  if directAttr
    el[directAttr]


@el.setAttr = (el, attr, value) ->
  directAttr = directAttributes[attr]
  if directAttr
    if attr is 'html' and typeof value isnt 'string'

  doc.createTextNode(text)


@el = exports = (tagSpecOrEl, args...) ->
  [attributes, children] = normalizeArguments(args)

  if isElement(tagSpecOrEl)
