miso
Copyright(C) 2016-2025 David M. Johnson
LicenseBSD3-style (see the file LICENSE)
MaintainerDavid M. Johnson <code@dmj.io>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Miso.Subscription.History

Description

 
Synopsis

Subscription

uriSub :: (URI -> action) -> Sub action Source #

Subscription for popstate events, from the History API

routerSub :: Router route => (Either RoutingError route -> action) -> Sub action Source #

Subscription for popstate events, from the History API, mapped to a user-defined Router

Functions

getURI :: JSM URI Source #

Retrieves the current relative URI by inspecting pathname, search and hash.

pushURI :: URI -> JSM () Source #

Pushes a new URI onto the History stack

replaceURI :: URI -> JSM () Source #

Replaces current URI on stack

back :: JSM () Source #

Navigates backwards

forward :: JSM () Source #

Navigates forwards

go :: Int -> JSM () Source #

Jumps to a specific position in history

Types

data URI Source #

Type for dealing with URI

Instances

Instances details
Show URI Source # 
Instance details

Defined in Miso.Router

Methods

showsPrec :: Int -> URI -> ShowS #

show :: URI -> String #

showList :: [URI] -> ShowS #

Eq URI Source # 
Instance details

Defined in Miso.Router

Methods

(==) :: URI -> URI -> Bool #

(/=) :: URI -> URI -> Bool #

ToMisoString URI Source # 
Instance details

Defined in Miso.Router