Permalink
Browse files

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

…he GET method
  • Loading branch information...
1 parent fe7bc44 commit 4676d7b1c883d413c6597ef93d5540759193ab2a @Aqua-Ye Aqua-Ye committed Jan 5, 2012
Showing with 9 additions and 4 deletions.
  1. +3 −3 opabsl/jsbsl/bslClient.js
  2. +6 −1 stdlib/web/client/client.opa
@@ -29,10 +29,10 @@
document.title = str;
}
-##register reload : -> void
- ##args()
+##register reload : bool -> void
+ ##args(forceget)
{
- location.reload();
+ location.reload(forceget);
}
##register jump : string -> void
@@ -137,7 +137,12 @@ type JsFunction = external
set_anchor(anchor) = (%% BslAnchors.set_anchor %%)(anchor)
}}
- reload = %% BslClient.Client.reload %%: -> void
+
+ /** Reload the page, may re-submit the form depending on the browser */
+ reload() = (%% BslClient.Client.reload %%)(false) : void
+
+ /** Reload the page, by choosing if we want to force the GET method */
+ do_reload = %% BslClient.Client.reload %% : bool -> void
get_cookie() =
get_cookie = %%BslClientOnly.get_cookie%%

0 comments on commit 4676d7b

Please sign in to comment.