Skip to content
This repository
Browse code

[feature] Client: added a new function for reloading page and force t…

…he GET method
  • Loading branch information...
commit 4676d7b1c883d413c6597ef93d5540759193ab2a 1 parent fe7bc44
Frederic Ye Aqua-Ye authored
6 opabsl/jsbsl/bslClient.js
@@ -29,10 +29,10 @@
29 29 document.title = str;
30 30 }
31 31
32   -##register reload : -> void
33   - ##args()
  32 +##register reload : bool -> void
  33 + ##args(forceget)
34 34 {
35   - location.reload();
  35 + location.reload(forceget);
36 36 }
37 37
38 38 ##register jump : string -> void
7 stdlib/web/client/client.opa
@@ -137,7 +137,12 @@ type JsFunction = external
137 137 set_anchor(anchor) = (%% BslAnchors.set_anchor %%)(anchor)
138 138
139 139 }}
140   - reload = %% BslClient.Client.reload %%: -> void
  140 +
  141 + /** Reload the page, may re-submit the form depending on the browser */
  142 + reload() = (%% BslClient.Client.reload %%)(false) : void
  143 +
  144 + /** Reload the page, by choosing if we want to force the GET method */
  145 + do_reload = %% BslClient.Client.reload %% : bool -> void
141 146
142 147 get_cookie() =
143 148 get_cookie = %%BslClientOnly.get_cookie%%

0 comments on commit 4676d7b

Please sign in to comment.
Something went wrong with that request. Please try again.