 (ns clojure.browser.dom
-  (:require [goog.dom :as dom]))
+  (:require [goog.dom :as gdom]))
 
 (defn append [parent & children]
-  (apply dom/append parent children)
+  (apply gdom/append parent children)
   parent)
 
 (defprotocol DOMBuilder

(defn log-obj [obj]
  (.log js/console obj))

(declare element)
(extend-protocol DOMBuilder

  string
  (-element
    ([this]
       (log "string (-element " this ")")
       (cond (keyword? this) (dom/createElement  (name this))
             :else           (dom/createTextNode (name s))))

    ([this attrs-or-children]
       (log "string (-element " this " " attrs-or-children ")")

                         nil)]
         (log-obj str-attrs)
         (if (seq children)
           (apply gdom/createDom
                  (name this)
                  str-attrs
                  (map -element children))
           (gdom/createDom (name this)
                          str-attrs)))))

  Vector
