 (declare build-element)
 
 (defn- text-node? [dom-node]
-  (= (.-nodeType dom-node) 3))
+  (identical? (.-nodeType dom-node) 3))
 
 (defn- replace-child [parent new-elem-spec cur-elem]
   (let [cur-dom-node cur-elem                                       ;;

(defn bind-attr! [element attr-name attr-value node-state]
  (let [attr-name (name attr-name)]
    (cond
      (= "style" attr-name)
      (do
        (assert (map? attr-value))
        (doseq [[p v] attr-value]
          (bind-style-prop! element p v node-state)))

      (= "data-state" attr-name)
      (bind-prop-attr! set-data-state! element attr-name attr-value node-state)

      (= 0 (.indexOf attr-name "on-"))
      (listen! element (.substring attr-name 3) attr-value)

      :default

  ([element state]
    (let [cur-state (get-data-state element)
          state (name state)]
      (when-not (identical? cur-state state)
        (do-set-data-state! element state)
        (let [leave-transition (get-transition element (keyword (str "after-" cur-state)))]
          (if leave-transition
