 
 (defprotocol IElementSpec
   (-get-virtual-dom [x]))
-
-;(defrecord ElementSpec [spec]
-;  IElementSpec
-;  (-get-virtual-dom [x] spec))
 
 (defn- dom-node? [x]
   (and x (> (.-nodeType x) 0)))

;; Building Elements

(defn insert-child! [parent child before]
  (cond
    (satisfies? IDeref child)
    (bind-child parent child before nil)

    :default
    (mount-element parent child before)))

(defn append-child! [parent child]
  (insert-child! parent child nil))

(defn- append-children! [elem children]
  (doseq [ch children]

      (node-detaching x (fn [] (remove-dom-node x)))
      (remove-dom-node x))
    (-remove! x)))

;; ## Polyfills

