summaryrefslogtreecommitdiff
path: root/history
diff options
context:
space:
mode:
Diffstat (limited to 'history')
-rw-r--r--history/history.ur16
-rw-r--r--history/history.urs14
-rw-r--r--history/historyFfi.js27
-rw-r--r--history/historyFfi.urs14
-rw-r--r--history/lib.urp6
5 files changed, 77 insertions, 0 deletions
diff --git a/history/history.ur b/history/history.ur
new file mode 100644
index 0000000..227049a
--- /dev/null
+++ b/history/history.ur
@@ -0,0 +1,16 @@
+(* Copyright 2016 Chelsea Voss
+
+Licensed under the Apache License, Version 2.0 (the “License”); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed
+under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR
+CONDITIONS OF ANY KIND, either express or implied. See the License for the
+specific language governing permissions and limitations under the License. *)
+
+structure Ffi = HistoryFfi
+
+val browserBack = Ffi.browserBack ()
diff --git a/history/history.urs b/history/history.urs
new file mode 100644
index 0000000..2dae3cc
--- /dev/null
+++ b/history/history.urs
@@ -0,0 +1,14 @@
+(* Copyright 2016 Chelsea Voss
+
+Licensed under the Apache License, Version 2.0 (the “License”); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed
+under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR
+CONDITIONS OF ANY KIND, either express or implied. See the License for the
+specific language governing permissions and limitations under the License. *)
+
+val browserBack : transaction unit
diff --git a/history/historyFfi.js b/history/historyFfi.js
new file mode 100644
index 0000000..aaef87a
--- /dev/null
+++ b/history/historyFfi.js
@@ -0,0 +1,27 @@
+// Copyright 2016 Chelsea Voss
+//
+// Licensed under the Apache License, Version 2.0 (the “License”); you may not
+// use this file except in compliance with the License. You may obtain a copy
+// of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an “AS IS” BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
+"use strict";
+
+(function() {
+ var history = {
+ browserBack: function() { window.history.back(); }
+ };
+
+ try {
+ UrWeb.History = history;
+ } catch (ReferenceError) {
+ window.UrWeb = {History: history};
+ }
+})();
diff --git a/history/historyFfi.urs b/history/historyFfi.urs
new file mode 100644
index 0000000..d62353c
--- /dev/null
+++ b/history/historyFfi.urs
@@ -0,0 +1,14 @@
+(* Copyright 2016 Chelsea Voss
+
+Licensed under the Apache License, Version 2.0 (the “License”); you may not use
+this file except in compliance with the License. You may obtain a copy of the
+License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed
+under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR
+CONDITIONS OF ANY KIND, either express or implied. See the License for the
+specific language governing permissions and limitations under the License. *)
+
+val browserBack : unit -> transaction unit
diff --git a/history/lib.urp b/history/lib.urp
new file mode 100644
index 0000000..cbc4e5e
--- /dev/null
+++ b/history/lib.urp
@@ -0,0 +1,6 @@
+ffi historyFfi
+jsFunc HistoryFfi.browserBack=UrWeb.History.browserBack
+file /xAjDQlqm.js historyFfi.js
+script /xAjDQlqm.js
+
+history