Eliom.Client_historyPages of the application, the navigation history, and the data associated to each state of the History API. Internal module.
Data stored in the session storage for each state of the History API.
type saved_state = state_id * stringThe value of history.state: the state id and the URL.
val saved_state_of_json : Deriving_Json_lexer.lexbuf -> saved_stateval saved_state_to_json : Buffer.t -> saved_state -> unitval saved_state_json : saved_state Deriving_Json.tval history_state :
state_id ->
string ->
Js_of_ocaml.Js.js_string Js_of_ocaml.Js.t Js_of_ocaml.Js.Opt.thistory_state id uri is the history.state value of the page with state id at uri.
Reads the data of a state from the session storage. Raises Not_found if there is none.
Saves the template and the scroll position of the active page in the session storage.
val section_page : Logs.srcmodule Page_status : sig ... endSee Client.Page_status.
type page = {page_unique_id : int;mutable page_id : state_id;mutable url : string;page_status : Page_status.t React.S.t;mutable previous_page : int option;set_page_status : ?step:React.step -> Page_status.t -> unit;mutable dom : Js_of_ocaml.Dom_html.bodyElement Js_of_ocaml.Js.t option;The DOM of the page, when it is cached
*)mutable reload_function : (unit -> unit -> Service.result Lwt.t) option;}val set_active_page : page -> unitMakes a page the active one, and retires the previous one.
val get_this_page : unit -> pageThe page the running code is generating, or the active page outside of a page generation.
val with_new_page :
?state_id:state_id ->
?old_page:page ->
replace:bool ->
unit ->
(unit -> 'a) ->
'awith_new_page ~replace () f runs f in the context of a new page, which get_this_page returns. With ~replace:true, the new page takes the state id of the active page.
Makes the page being generated the active one, and adds it to the history if it is not already there.
module History : sig ... end