           (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]

  "Walks an existing dom-node and makes sure that it has the same attributes and children as the given el."
  [dom-node el & {:keys [defer-attr]
                  :or {defer-attr false}}]
  (let [el (cannonicalize el)]
    (when (not= (.toLowerCase (.-nodeName dom-node))
                (.toLowerCase (name (:tag el))))
      (throw "Cannot merge el into node of a different type"))

                                                                [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}))))

