           (merge-dom! dom-child el-child :defer-attr defer-attr))
     dom-node))
 
-(defn cannonicalize
+(defn canonicalize
   "Parse hiccup-like vec into map of {:tag :attr :children}, or return string as itself.
    Based on Pinot's html/normalize-element."
   [x]

(defn build-dom-elem [el]
  (match [el]
         [(s :when string?)] (gdom/createTextNode s)
         [(v :when vector?)] (recur (cannonicalize v))
         [(m :when map?)] ;;Can't use {:keys [...]} destructuring in place of m in this clause. Why?
         (let [{:keys [nsp tag children] :as elm} m
               elem (create-elem nsp tag)]

                                                                [tag-attrs content])
                                     ;;Explode children seqs in place
                                     children (mapcat #(if (and (not (vector? %)) (seq? %))
                                                         (map canonicalize %)
                                                         [(canonicalize %)])
                                                      raw-children)]
                                 {:nsp nsp :tag tag :attr attr :children children}))))

