Helpers for history interaction as part of an Interface
An Interface for changing the app-specific URL
and adding a new entry to the browser history
without triggering a page load.
Replacement for Browser.Navigation.pushUrl
An Interface for changing the app-specific URL,
without triggering a page load or adding a new entry to the browser history.
This can be useful if you have search box and you want the ?search=hats in the URL to match without adding a history entry for every single key stroke. Imagine how annoying it would be to click back thirty times and still be on the same page!
Replacement for Browser.Navigation.replaceUrl
An Interface for going forward a given number of pages.
If there are no more pages in the future, this will do nothing.
Note: You only manage the browser history that you created.
Replacement for Browser.Navigation.forward
An Interface for going back a given number of pages.
Note: You only manage the browser history that you created.
Replacement for Browser.Navigation.back
If you used pushUrl to update the URL with new history entries,
when the user clicks ← or → buttons (or you call moveForward or moveBack yourself),
the URL will change but your UI will not.
movementListen is an Interface for detecting those URL changes and making ui changes as needed.
When the app itself initiates a url change with pushUrl or replaceUrl, no such event is triggered.
Note: This event is called "popstate" in js
An Interface for leaving the current page and loading the given URL.
This always results in a page load, even if the provided URL is the same as the current one.
gotoElmWebsite : Web.Interface future_
gotoElmWebsite =
Web.Navigation.load "https://elm-lang.org/"Replacement for Browser.Navigation.load
An Interface for reloading the current page.
This always results in a page load!
Note: This may grab resources from the browser cache.
Replacement for Browser.Navigation.reload
An
Interfacefor getting the current page's app-specific URL. Is usually used while starting up the app.Note: Uses
window.location.href