                 (.setAttribute @last-node "onclick" @prev-on-click))
               (.. @last-node -classList (remove "highlight-element")))
             (remove-all-listeners)))))))
+
+(def attached-listeners
+  (do (or (gobj/get js/window "attached-listeners")
+          (gobj/set js/window "attached-listeners" (atom #{})))
+    (gobj/get js/window "attached-listeners")))
 
 (defn install-listeners []
   (let [add-listener (fn [et f] (swap! attached-listeners conj (gevt/listen js/document et f)))

    ;  (.preventDefault e)
    ;  (.stopPropagation e)
    ;  (.stopImmediatePropagation e))
    (js/console.log @node-clone)))

(defn toggle-devtools [{:keys [last-node node-clone prev-on-click remove-all-listeners install-listeners]}]
  (fn [e]

    [om.dom :as dom]
    [goog.object :as gobj]
    [goog.dom :as gdom]
    [goog.events :as gevt]
    [figwheel.client.heads-up :refer [heads-up-event-dispatch]])
  (:import
    goog.events.EventType))

(defn highlight-element [{:keys [node-clone prev-on-click last-node]}]
  (fn [e]
