Liking cljdoc? Tell your friends :D

reitit.frontend.history

Provides integration to hash-change or HTML5 History events.

Provides integration to hash-change or HTML5 History
events.

FragmentHistory

source

Historyprotocol

-get-path
(-get-path this)
-href
(-href this path)
-init
(-init this)

Create event listeners

Create event listeners

-on-navigate
(-on-navigate this path)
-stop
(-stop this)

Remove event listeners

Remove event listeners

source

href

(href history k)
(href history k params)
(href history k params query)
source

Html5History

source

push-state

(push-state history k)
(push-state history k params)
(push-state history k params query)

Sets the new route, leaving previous route in history.

Sets the new route, leaving previous route in history.
sourceraw docstring

replace-state

(replace-state history k)
(replace-state history k params)
(replace-state history k params query)

Replaces current route. I.e. current route is not left on history.

Replaces current route. I.e. current route is not left on history.
sourceraw docstring

start!

(start! router on-navigate)
(start! router
        on-navigate
        {:keys [use-fragment], :or {use-fragment true}})

This registers event listeners on HTML5 history and hashchange events.

Returns History object.

When using with development workflow like Figwheel, remember to remove listeners using stop! call before calling start! again.

Parameters:

  • router The Reitit router.
  • on-navigate Function to be called when route changes. Takes two parameters, ´match´ and ´history´ object.

Options:

  • :use-fragment (default true) If true, onhashchange and location hash are used to store current route.
This registers event listeners on HTML5 history and hashchange events.

Returns History object.

When using with development workflow like Figwheel, remember to
remove listeners using stop! call before calling start! again.

Parameters:
- router         The Reitit router.
- on-navigate    Function to be called when route changes. Takes two parameters, ´match´ and ´history´ object.

Options:
- :use-fragment  (default true) If true, onhashchange and location hash are used to store current route.
sourceraw docstring

stop!

(stop! history)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close