Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #98: updated the goog.History example. #105

Merged
merged 1 commit into from Feb 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Expand Up @@ -275,9 +275,9 @@ vector.
```clojure
(ns example
(:require [secretary.core :as secretary :refer-macros [defroute]]
[goog.events :as events]
[goog.history.EventType :as EventType])
(:import goog.History))
[goog.events :as events])
(:import [goog History]
[goog.history EventType]))

(def application
(js/document.getElementById "application"))
Expand Down Expand Up @@ -309,9 +309,9 @@ vector.
(set-html! application "<h1>LOL! YOU LOST!</h1>"))

;; Quick and dirty history configuration.
(let [h (History.)]
(goog.events/listen h EventType/NAVIGATE #(secretary/dispatch! (.-token %)))
(doto h (.setEnabled true)))
(doto (History.)
(events/listen EventType.NAVIGATE #(secretary/dispatch! (.-token %)))
(.setEnabled true))
```


Expand Down