 
 ;; ## Attributes, Styles & Events
 
+(defn- set-attr! [elem attr-name attr-value]
+  (.setAttribute elem attr-name attr-value))
+
+(defn- remove-attr! [elem attr-name]
+  (.removeAttribute elem attr-name))
+
 (defn- set-style-prop! [elem prop-name prop-value]
-  (let [prop-name (name prop-name)]
-    (aset (.-style elem) prop-name (str prop-value))))
-
-(defn- set-attr! [elem attr-name attr-value]
-  (let [attr-name (name attr-name)]
-    (.setAttribute elem attr-name attr-value)))
+  (aset (.-style elem) prop-name (str prop-value)))
+
+(defn- remove-style-prop! [elem prop-name]
+  (js-delete (.-style elem) prop-name))
 
 (defn- on-value-ref-invalidated* [set-fn element state-prefix attr-name ref node-state]
   (when-let [[add-watch* remove-watch*] (r/get-add-remove-watch* ref)]

      new-elem)
    new-elem))

(defn- replace-or-append-child [parent new-elem cur-elem]
  (let [new-elem
        (if cur-elem
          (replace-child parent new-elem cur-elem)
          (append-child parent new-elem))]
    (when-not (text-node? new-elem)
      (when-let [parent-state (get-element-state parent)]

      ;(set! (.-cur-element state)
      ;      (transition-element parent (or (non-reactively @child-ref) [:span]) nil))
      (when-let [parent-state (get-element-state parent)]
        (register-with-parent-state parent-state "-reactive" state))
      state)
    (transition-element parent @child-ref nil)))

