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

Change reload behavior to use current url #504

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/os_lib.eliom
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,15 @@
*)

let%client reload () =
Eliom_client.change_page ~service:Eliom_service.reload_action_hidden () ()
let uri =
if Eliom_client.is_client_app ()
&& Js.Unsafe.global##.___eliom_server_ <> Js.undefined
then Format.sprintf "%s/%s"
Js.(to_string Unsafe.global##.___eliom_server_)
!Eliom_client.current_uri
else Eliom_lib.Url.resolve !Eliom_client.current_uri
in
Eliom_client.change_page_uri ~replace:true uri

let%shared memoizator f =
let value_ref = ref None in
Expand Down