     new-elem))
 
 (declare replace-child)
-
+(declare append-child!)
 (declare append-children!)
 
 (defn- try-diff-subseq [parent cur-child new-children]

(defn- replace-attrs!* [node node-state old-attrs new-attrs rebinder]
  (let [hit #js {}]
    (doseq [[attr-name new-val] new-attrs]
      (rebinder node attr-name new-val node-state)
      (when (get old-attrs attr-name)
          (aset hit (str attr-name) true)))
    (doseq [[attr-name _] old-attrs]
      (let [attr-str (str attr-name)]
        (when-not (aget hit attr-str)
          (rebinder node attr-name nil node-state))))))

;(defn- replace-attrs!* [node node-state old-attrs new-attrs rebinder]

  (.removeAttribute elem attr-name))

(defn- set-style-prop! [elem prop-name prop-value]
  ;(println "set-style-prop!" elem prop-name prop-value)
  (if prop-value
    (aset (.-style elem)
          prop-name
          (if (.-substring prop-value)
            prop-value
            (.toString prop-value)))
    (js-delete (.-style elem) prop-name)))

(defn- remove-style-prop! [elem prop-name]
  (js-delete (.-style elem) prop-name))
