                           (fn []
                             (unlisten!* element event-name handler)))}]
       (register-with-parent-state node-state (str "-" "event" "." event-name) attr-state)
-      (listen! element event-name handler)))
+      (listen! element event-name handler))
+  handler)
 
 (defn- bind-style! [element styles node-state]
   (doseq [[p v] styles]

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


(def ^:private attr-setters
  #js
  {:data-state (fn [element state]
                 (set-data-state! element state)
                 state)
   :class (fn [element cls]
               (set! (.-className element) cls)
               cls)
   ;; :id (fn [element id] (set! (.-id element) id))
   })

