summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2019-03-30 20:11:18 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2019-03-30 20:11:18 -0400
commit36cf7530768eeec286e4a07a5794c0e1b27b8c3f (patch)
treeb3ec7a8c16fd8ecea0c52c2f89fab8aab7f02db7
parent8e561ed471518c426c59f210f5ea07d4f178cbe5 (diff)
Allow Basis.currentUrl on client side
-rw-r--r--lib/js/urweb.js4
-rw-r--r--src/settings.sml1
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js
index 749e5056..66d427c8 100644
--- a/lib/js/urweb.js
+++ b/lib/js/urweb.js
@@ -3269,6 +3269,10 @@ function confrm(s) {
return confirm(s) ? true : false;
}
+function currentUrl() {
+ return window.location;
+}
+
// URL blessing
diff --git a/src/settings.sml b/src/settings.sml
index edc03d4c..ac403027 100644
--- a/src/settings.sml
+++ b/src/settings.sml
@@ -327,6 +327,7 @@ val jsFuncsBase = basisM [("alert", "alert"),
("checkUrl", "checkUrl"),
("bless", "bless"),
("blessData", "blessData"),
+ ("currentUrl", "currentUrl"),
("eq_time", "eq"),
("lt_time", "lt"),