-(ns ^{:doc "Wraps Google Closure's history functionality."}
+(ns ^{:doc "Supports working with Google Closure's history management
+  object."}
   library.browser.history
   (:require [clojure.browser.event :as event]
             [goog.History :as history]))

        h)))

(defn set-token
  [history token]
  (.setToken history (name token)))


           (js->clj goog.history.EventType)))))

(defn history
  "Create a new history object in user visible mode. This allows users
  to, for example, hit the browser's back button without leaving the
  current page. The current history state is shown in the browser
  address bar as a document location fragment (the portion of the URL
  after the '#'). These addresses can be bookmarked, copied and pasted
  into another browser, and modified directly by the user like any
  other URL.

  Any changes to the location hash will call the passed callback
  function."
  [callback]
  (let [h (goog.History.)]
    (do (event/listen h "navigate"
