From 621ab4408936974b09a9160a36c77975d4db457e Mon Sep 17 00:00:00 2001 From: Jan Rochel Date: Fri, 7 Dec 2018 13:48:50 +0100 Subject: [PATCH 1/5] compatibility with tyxml.4.3.0: touch event handling --- src/lib/eliom_client_core.client.ml | 11 ++++++++++- src/lib/eliom_content.server.mli | 4 ++++ src/lib/eliom_content_core.client.ml | 6 ++++++ src/lib/eliom_content_core.client.mli | 4 ++++ src/lib/eliom_content_core.server.ml | 3 +++ src/lib/eliom_content_core.server.mli | 2 ++ src/lib/eliom_runtime.shared.ml | 2 ++ src/lib/eliom_runtime.shared.mli | 2 ++ src/lib/eliom_shared_content.eliom | 6 ++++++ src/lib/eliom_shared_content.eliomi | 2 ++ 10 files changed, 41 insertions(+), 1 deletion(-) diff --git a/src/lib/eliom_client_core.client.ml b/src/lib/eliom_client_core.client.ml index 3bb5d522f1..4a69ea927a 100644 --- a/src/lib/eliom_client_core.client.ml +++ b/src/lib/eliom_client_core.client.ml @@ -477,6 +477,10 @@ let reify_caml_event name node ce = name, `Keyboard (fun ev -> try f ev; true with Eliom_client_value.False -> false) + | Xml.CE_client_closure_touch f -> + name, + `Touch + (fun ev -> try f ev; true with Eliom_client_value.False -> false) | Xml.CE_client_closure_mouse f -> name, `Mouse @@ -500,14 +504,19 @@ let register_event_handler, flush_load_script = add f | "onload", `Keyboard _ -> failwith "keyboard event handler for onload" + | "onload", `Touch _ -> + failwith "touch event handler for onload" | "onload", `Mouse _ -> - failwith "keyboard event handler for onload" + failwith "mouse event handler for onload" | name, `Other f -> Js.Unsafe.set node (Js.bytestring name) (Dom_html.handler (fun ev -> Js.bool (f ev))) | name, `Keyboard f -> Js.Unsafe.set node (Js.bytestring name) (Dom_html.handler (fun ev -> Js.bool (f ev))) + | name, `Touch f -> + Js.Unsafe.set node (Js.bytestring name) + (Dom_html.handler (fun ev -> Js.bool (f ev))) | name, `Mouse f -> Js.Unsafe.set node (Js.bytestring name) (Dom_html.handler (fun ev -> Js.bool (f ev))) diff --git a/src/lib/eliom_content.server.mli b/src/lib/eliom_content.server.mli index 3d2e0c9a79..71845f306e 100644 --- a/src/lib/eliom_content.server.mli +++ b/src/lib/eliom_content.server.mli @@ -96,6 +96,8 @@ module Xml : sig (Dom_html.mouseEvent Js.t -> unit) Eliom_client_value.t and type keyboard_event_handler = (Dom_html.keyboardEvent Js.t -> unit) Eliom_client_value.t + and type touch_event_handler = + (Dom_html.touchEvent Js.t -> unit) Eliom_client_value.t (** {2 Unique nodes } *) @@ -164,6 +166,8 @@ module Xml_shared : Xml_sigs.T (Dom_html.mouseEvent Js.t -> unit) Eliom_client_value.t and type keyboard_event_handler = (Dom_html.keyboardEvent Js.t -> unit) Eliom_client_value.t + and type touch_event_handler = + (Dom_html.touchEvent Js.t -> unit) Eliom_client_value.t (** Building and pretty-printing valid SVG tree. Information about Svg api can be found at {% <> %}*) diff --git a/src/lib/eliom_content_core.client.ml b/src/lib/eliom_content_core.client.ml index 013ceeea56..10b48f936d 100644 --- a/src/lib/eliom_content_core.client.ml +++ b/src/lib/eliom_content_core.client.ml @@ -90,6 +90,7 @@ module Xml = struct type event_handler = Dom_html.event Js.t -> unit type mouse_event_handler = Dom_html.mouseEvent Js.t -> unit type keyboard_event_handler = Dom_html.keyboardEvent Js.t -> unit + type touch_event_handler = Dom_html.touchEvent Js.t -> unit let event_handler_attrib name (value : event_handler) = internal_event_handler_attrib name @@ -100,6 +101,9 @@ module Xml = struct let keyboard_event_handler_attrib name (value : keyboard_event_handler) = internal_event_handler_attrib name (Caml (CE_client_closure_keyboard value)) + let touch_event_handler_attrib name (value : touch_event_handler) = + internal_event_handler_attrib name + (Caml (CE_client_closure_touch value)) let node_react_children ?(a = []) name children = {elt = Lazy.from_val (ReactChildren (Node (name,a,[]),children)); node_id=NoId} @@ -183,6 +187,7 @@ struct type event_handler = Xml.event_handler type mouse_event_handler = Xml.mouse_event_handler type keyboard_event_handler = Xml.keyboard_event_handler + type touch_event_handler = Xml.touch_event_handler type attrib = Xml.attrib let float_attrib name s : attrib = @@ -198,6 +203,7 @@ struct let event_handler_attrib = Xml.event_handler_attrib let mouse_event_handler_attrib = Xml.mouse_event_handler_attrib let keyboard_event_handler_attrib = Xml.keyboard_event_handler_attrib + let touch_event_handler_attrib = Xml.touch_event_handler_attrib let uri_attrib name value = name, Xml.RAReact (React.S.map (fun f -> Some (Xml.AStr (Eliom_lazy.force f))) value) diff --git a/src/lib/eliom_content_core.client.mli b/src/lib/eliom_content_core.client.mli index a5f002d55a..a347a7f5f8 100644 --- a/src/lib/eliom_content_core.client.mli +++ b/src/lib/eliom_content_core.client.mli @@ -44,6 +44,8 @@ module Xml : sig (Dom_html.mouseEvent Js.t -> unit) (* Client side-only *) | CE_client_closure_keyboard of (Dom_html.keyboardEvent Js.t -> unit) (* Client side-only *) + | CE_client_closure_touch of + (Dom_html.touchEvent Js.t -> unit) (* Client side-only *) | CE_call_service of ( [ `A | `Form_get | `Form_post] * ((bool * string list) option) * @@ -55,6 +57,7 @@ module Xml : sig type event_handler = Dom_html.event Js.t -> unit type mouse_event_handler = Dom_html.mouseEvent Js.t -> unit type keyboard_event_handler = Dom_html.keyboardEvent Js.t -> unit + type touch_event_handler = Dom_html.touchEvent Js.t -> unit type ename = string type elt @@ -109,6 +112,7 @@ module Xml : sig val event_handler_attrib : aname -> event_handler -> attrib val mouse_event_handler_attrib : aname -> mouse_event_handler -> attrib val keyboard_event_handler_attrib : aname -> keyboard_event_handler -> attrib + val touch_event_handler_attrib : aname -> touch_event_handler -> attrib val uri_attrib : aname -> uri -> attrib val uris_attrib : aname -> uri list -> attrib diff --git a/src/lib/eliom_content_core.server.ml b/src/lib/eliom_content_core.server.ml index 2f0654fc23..3958ac74a6 100644 --- a/src/lib/eliom_content_core.server.ml +++ b/src/lib/eliom_content_core.server.ml @@ -118,6 +118,7 @@ module Xml = struct type event_handler = (Dom_html.event Js.t -> unit) Eliom_client_value.t type mouse_event_handler = (Dom_html.mouseEvent Js.t -> unit) Eliom_client_value.t type keyboard_event_handler = (Dom_html.keyboardEvent Js.t -> unit) Eliom_client_value.t + type touch_event_handler = (Dom_html.touchEvent Js.t -> unit) Eliom_client_value.t let make_cryptographic_safe_string () = (* FIX: we should directly produce a string of the right length *) @@ -138,6 +139,8 @@ module Xml = struct biggest_event_handler_attrib name cf let keyboard_event_handler_attrib name (cf : keyboard_event_handler) = biggest_event_handler_attrib name cf + let touch_event_handler_attrib name (cf : touch_event_handler) = + biggest_event_handler_attrib name cf let client_attrib ?init (x : attrib Eliom_client_value.t) = let crypto = make_cryptographic_safe_string () in diff --git a/src/lib/eliom_content_core.server.mli b/src/lib/eliom_content_core.server.mli index 7b13822ccf..0ff2a9778c 100644 --- a/src/lib/eliom_content_core.server.mli +++ b/src/lib/eliom_content_core.server.mli @@ -30,6 +30,8 @@ module Xml : sig (Dom_html.mouseEvent Js.t -> unit) Eliom_client_value.t and type keyboard_event_handler = (Dom_html.keyboardEvent Js.t -> unit) Eliom_client_value.t + and type touch_event_handler = + (Dom_html.touchEvent Js.t -> unit) Eliom_client_value.t type caml_event_handler diff --git a/src/lib/eliom_runtime.shared.ml b/src/lib/eliom_runtime.shared.ml index 0efc713b54..976c7879da 100644 --- a/src/lib/eliom_runtime.shared.ml +++ b/src/lib/eliom_runtime.shared.ml @@ -57,6 +57,8 @@ module RawXML = struct (Dom_html.mouseEvent Js.t -> unit) (* Client side-only *) | CE_client_closure_keyboard of (Dom_html.keyboardEvent Js.t -> unit) (* Client side-only *) + | CE_client_closure_touch of + (Dom_html.touchEvent Js.t -> unit) (* Client side-only *) | CE_call_service of ( [ `A | `Form_get | `Form_post] * (cookie_info option) * diff --git a/src/lib/eliom_runtime.shared.mli b/src/lib/eliom_runtime.shared.mli index a58a2d48c7..5145d3b252 100644 --- a/src/lib/eliom_runtime.shared.mli +++ b/src/lib/eliom_runtime.shared.mli @@ -63,6 +63,8 @@ module RawXML : sig (Dom_html.mouseEvent Js.t -> unit) (* Client side-only *) | CE_client_closure_keyboard of (Dom_html.keyboardEvent Js.t -> unit) (* Client side-only *) + | CE_client_closure_touch of + (Dom_html.touchEvent Js.t -> unit) (* Client side-only *) | CE_call_service of ( [ `A | `Form_get | `Form_post] * (cookie_info option) * diff --git a/src/lib/eliom_shared_content.eliom b/src/lib/eliom_shared_content.eliom index 76aca16bc2..b679dd608a 100644 --- a/src/lib/eliom_shared_content.eliom +++ b/src/lib/eliom_shared_content.eliom @@ -68,6 +68,9 @@ module Xml = struct type keyboard_event_handler = (Dom_html.keyboardEvent Js.t -> unit) Eliom_client_value.t + type touch_event_handler = + (Dom_html.touchEvent Js.t -> unit) Eliom_client_value.t + (* attributes *) type attrib = Eliom_content_core.Xml.attrib @@ -127,6 +130,9 @@ module Xml = struct let keyboard_event_handler_attrib = Eliom_content_core.Xml.keyboard_event_handler_attrib + let touch_event_handler_attrib = + Eliom_content_core.Xml.touch_event_handler_attrib + let mouse_event_handler_attrib = Eliom_content_core.Xml.mouse_event_handler_attrib diff --git a/src/lib/eliom_shared_content.eliomi b/src/lib/eliom_shared_content.eliomi index 21e14555d3..2b000554bb 100644 --- a/src/lib/eliom_shared_content.eliomi +++ b/src/lib/eliom_shared_content.eliomi @@ -27,6 +27,8 @@ module Xml : Xml_sigs.T (Dom_html.mouseEvent Js.t -> unit) Eliom_client_value.t and type keyboard_event_handler = (Dom_html.keyboardEvent Js.t -> unit) Eliom_client_value.t + and type touch_event_handler = + (Dom_html.touchEvent Js.t -> unit) Eliom_client_value.t module Svg : sig From 368a55e91e21be981a47141b6721a4f074213464 Mon Sep 17 00:00:00 2001 From: Jan Rochel Date: Fri, 7 Dec 2018 15:58:34 +0100 Subject: [PATCH 2/5] compatibility with js_of_ocaml.3.3.0: changes package name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit js_of_ocaml.syntax → js_of_ocaml-camlp4 --- pkg/META | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/META b/pkg/META index 11fd1c3d3c..7ab2a4d2d0 100644 --- a/pkg/META +++ b/pkg/META @@ -98,8 +98,8 @@ package "syntax" ( description = "Syntax extension: predefined commonly use syntaxes" version = "[distributed with Eliom]" - requires(syntax, preprocessor) = "js_of_ocaml.syntax,js_of_ocaml-camlp4.deriving,lwt_camlp4" - requires(syntax, toploop) = "js_of_ocaml.syntax,js_of_ocaml-camlp4.deriving,lwt_camlp4" + requires(syntax, preprocessor) = "js_of_ocaml-camlp4,js_of_ocaml-camlp4.deriving,lwt_camlp4" + requires(syntax, toploop) = "js_of_ocaml-camlp4,js_of_ocaml-camlp4.deriving,lwt_camlp4" archive(syntax, preprocessor) = "-ignore dummy" ) From 6e4079a7011243ae64298cb320423d64a7272166 Mon Sep 17 00:00:00 2001 From: Jan Rochel Date: Fri, 7 Dec 2018 12:32:51 +0100 Subject: [PATCH 3/5] remove warnings due to js_of_ocaml.3.3.0 --- src/lib/client/eliommod_cookies.ml | 1 + src/lib/client/eliommod_dom.ml | 1 + src/lib/client/eliommod_dom.mli | 2 ++ src/lib/client/eliommod_parameters.ml | 2 ++ src/lib/eliom_client.client.ml | 1 + src/lib/eliom_client.client.mli | 1 + src/lib/eliom_client_core.client.ml | 1 + src/lib/eliom_client_main.eliom | 2 ++ src/lib/eliom_comet.client.ml | 1 + src/lib/eliom_config.client.ml | 2 ++ src/lib/eliom_content.client.mli | 2 ++ src/lib/eliom_content.eliom | 3 +++ src/lib/eliom_content.server.mli | 2 ++ src/lib/eliom_content_.client.ml | 1 + src/lib/eliom_content_core.client.ml | 1 + src/lib/eliom_content_core.client.mli | 2 ++ src/lib/eliom_content_core.server.ml | 1 + src/lib/eliom_content_core.server.mli | 2 ++ src/lib/eliom_form.eliom | 2 ++ src/lib/eliom_form.eliomi | 2 ++ src/lib/eliom_lib.client.ml | 2 ++ src/lib/eliom_lib.client.mli | 2 ++ src/lib/eliom_parameter.client.ml | 2 ++ src/lib/eliom_parameter.client.mli | 2 ++ src/lib/eliom_process.client.ml | 1 + src/lib/eliom_request.client.ml | 1 + src/lib/eliom_request.client.mli | 2 ++ src/lib/eliom_request_info.client.ml | 1 + src/lib/eliom_runtime.shared.ml | 2 ++ src/lib/eliom_runtime.shared.mli | 1 + src/lib/eliom_shared_content.eliom | 2 ++ src/lib/eliom_shared_content.eliomi | 2 ++ src/lib/eliom_unwrap.client.ml | 1 + src/lib/eliom_unwrap.client.mli | 2 ++ 34 files changed, 55 insertions(+) diff --git a/src/lib/client/eliommod_cookies.ml b/src/lib/client/eliommod_cookies.ml index 49eb6b4588..e347ce30ac 100644 --- a/src/lib/client/eliommod_cookies.ml +++ b/src/lib/client/eliommod_cookies.ml @@ -17,6 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) +open Js_of_ocaml open Eliom_lib open Ocsigen_cookies diff --git a/src/lib/client/eliommod_dom.ml b/src/lib/client/eliommod_dom.ml index f520c41eb1..05d11bd39e 100644 --- a/src/lib/client/eliommod_dom.ml +++ b/src/lib/client/eliommod_dom.ml @@ -17,6 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) +open Js_of_ocaml open Eliom_lib let section = Lwt_log.Section.make "eliom:dom" diff --git a/src/lib/client/eliommod_dom.mli b/src/lib/client/eliommod_dom.mli index 8623b435b2..afada8cda5 100644 --- a/src/lib/client/eliommod_dom.mli +++ b/src/lib/client/eliommod_dom.mli @@ -19,6 +19,8 @@ (** Cross browser dom manipulation functions *) +open Js_of_ocaml + class type ['element] get_tag = object method getElementsByTagName : Js.js_string Js.t -> 'element Dom.nodeList Js.t Js.meth end diff --git a/src/lib/client/eliommod_parameters.ml b/src/lib/client/eliommod_parameters.ml index 5a95218566..1d9f4e2972 100644 --- a/src/lib/client/eliommod_parameters.ml +++ b/src/lib/client/eliommod_parameters.ml @@ -17,6 +17,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) +open Js_of_ocaml + type param = Form.form_elt type field = [`String of Js.js_string Js.t | `File of File.file Js.t ] diff --git a/src/lib/eliom_client.client.ml b/src/lib/eliom_client.client.ml index 5795c9fbbd..d2210b2d52 100644 --- a/src/lib/eliom_client.client.ml +++ b/src/lib/eliom_client.client.ml @@ -25,6 +25,7 @@ include Eliom_client_core before Eliom_service, in order to make possible to use the client-server syntax in Eliom itself. *) +open Js_of_ocaml open Eliom_lib module Opt = Eliom_lib.Option diff --git a/src/lib/eliom_client.client.mli b/src/lib/eliom_client.client.mli index 20141b7c09..6be89acb25 100644 --- a/src/lib/eliom_client.client.mli +++ b/src/lib/eliom_client.client.mli @@ -20,6 +20,7 @@ (** Call server side services and change the current page. *) +open Js_of_ocaml open Eliom_lib (** {2 Mobile applications} *) diff --git a/src/lib/eliom_client_core.client.ml b/src/lib/eliom_client_core.client.ml index 4a69ea927a..f07801ee46 100644 --- a/src/lib/eliom_client_core.client.ml +++ b/src/lib/eliom_client_core.client.ml @@ -19,6 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) +open Js_of_ocaml open Eliom_lib module Xml = Eliom_content_core.Xml diff --git a/src/lib/eliom_client_main.eliom b/src/lib/eliom_client_main.eliom index 2849d6f51d..2fea8a7840 100644 --- a/src/lib/eliom_client_main.eliom +++ b/src/lib/eliom_client_main.eliom @@ -20,6 +20,8 @@ [%%client.start] +open Js_of_ocaml + let _ = Eliom_client.init () (* The following lines are for Eliom_bus, Eliom_comet and Eliom_react diff --git a/src/lib/eliom_comet.client.ml b/src/lib/eliom_comet.client.ml index 0ee6f17c11..a2e43e31d8 100644 --- a/src/lib/eliom_comet.client.ml +++ b/src/lib/eliom_comet.client.ml @@ -21,6 +21,7 @@ (* This file is for client-side comet-programming. *) +open Js_of_ocaml module Ecb = Eliom_comet_base let section = Eliom_lib.Lwt_log.Section.make "eliom:comet" diff --git a/src/lib/eliom_config.client.ml b/src/lib/eliom_config.client.ml index 373f78b930..730c7b3988 100644 --- a/src/lib/eliom_config.client.ml +++ b/src/lib/eliom_config.client.ml @@ -18,6 +18,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) +open Js_of_ocaml + let get_default_hostname () = Url.Current.host let get_default_port () = 80 (*VVV take from server? !!!!!!!!! *) (*RRR ??? Url.default_http_port ???*) let get_default_sslport () = 443 (*VVV take from server? !!!!!!!!! *) (*RRR ??? replace by Url.default_https_port ???*) diff --git a/src/lib/eliom_content.client.mli b/src/lib/eliom_content.client.mli index 39f9a5eff7..bbbc3146ab 100644 --- a/src/lib/eliom_content.client.mli +++ b/src/lib/eliom_content.client.mli @@ -17,6 +17,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) +open Js_of_ocaml + (** This module provides the creation of valid XML content, i.e. XML, SVG, and (X)HTML5. diff --git a/src/lib/eliom_content.eliom b/src/lib/eliom_content.eliom index 11a9da8826..d8034d8b31 100644 --- a/src/lib/eliom_content.eliom +++ b/src/lib/eliom_content.eliom @@ -20,6 +20,9 @@ [%%shared type boxed] [%%client + +open Js_of_ocaml + include Eliom_content_ let force_link = () diff --git a/src/lib/eliom_content.server.mli b/src/lib/eliom_content.server.mli index 71845f306e..e15a5b3502 100644 --- a/src/lib/eliom_content.server.mli +++ b/src/lib/eliom_content.server.mli @@ -81,6 +81,8 @@ *) +open Js_of_ocaml + (** Low-level XML manipulation. *) module Xml : sig diff --git a/src/lib/eliom_content_.client.ml b/src/lib/eliom_content_.client.ml index c00d9410d1..d6917362c0 100644 --- a/src/lib/eliom_content_.client.ml +++ b/src/lib/eliom_content_.client.ml @@ -18,6 +18,7 @@ *) +open Js_of_ocaml open Eliom_lib open Eliom_content_core diff --git a/src/lib/eliom_content_core.client.ml b/src/lib/eliom_content_core.client.ml index 10b48f936d..592d0f1356 100644 --- a/src/lib/eliom_content_core.client.ml +++ b/src/lib/eliom_content_core.client.ml @@ -23,6 +23,7 @@ Its name is not [Eliom_content_base] because this would suggest the sharing between server and client. *) +open Js_of_ocaml open Eliom_lib module Xml = struct diff --git a/src/lib/eliom_content_core.client.mli b/src/lib/eliom_content_core.client.mli index a347a7f5f8..ba97605d5d 100644 --- a/src/lib/eliom_content_core.client.mli +++ b/src/lib/eliom_content_core.client.mli @@ -17,6 +17,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) +open Js_of_ocaml + (** XML building and deconstructing. Cf. {% <> %}. *) diff --git a/src/lib/eliom_content_core.server.ml b/src/lib/eliom_content_core.server.ml index 3958ac74a6..e48250eca1 100644 --- a/src/lib/eliom_content_core.server.ml +++ b/src/lib/eliom_content_core.server.ml @@ -18,6 +18,7 @@ *) +open Js_of_ocaml open Eliom_lib (* This the core of [Eliom_content] without its dependencies to [Eliom_service] et al. diff --git a/src/lib/eliom_content_core.server.mli b/src/lib/eliom_content_core.server.mli index 0ff2a9778c..a9206e2802 100644 --- a/src/lib/eliom_content_core.server.mli +++ b/src/lib/eliom_content_core.server.mli @@ -20,6 +20,8 @@ (** See {% <> %} for complete module. *) +open Js_of_ocaml + module Xml : sig include Xml_sigs.Iterable with type 'a wrap = 'a diff --git a/src/lib/eliom_form.eliom b/src/lib/eliom_form.eliom index 483e0538e2..2ea0674258 100644 --- a/src/lib/eliom_form.eliom +++ b/src/lib/eliom_form.eliom @@ -18,6 +18,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) +open%shared Js_of_ocaml + [%%client.start] let read_params form y = diff --git a/src/lib/eliom_form.eliomi b/src/lib/eliom_form.eliomi index ccafaf08a5..b11adffe47 100644 --- a/src/lib/eliom_form.eliomi +++ b/src/lib/eliom_form.eliomi @@ -24,6 +24,8 @@ val set_error_handler : (unit -> bool Lwt.t) -> unit [%%shared.start] +open Js_of_ocaml + module type Html = sig include Html_sigs.T diff --git a/src/lib/eliom_lib.client.ml b/src/lib/eliom_lib.client.ml index 55da678c65..382fff5c7c 100644 --- a/src/lib/eliom_lib.client.ml +++ b/src/lib/eliom_lib.client.ml @@ -16,6 +16,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) +open Js_of_ocaml + include Ocsigen_lib_base include (Eliom_lib_base : module type of Eliom_lib_base diff --git a/src/lib/eliom_lib.client.mli b/src/lib/eliom_lib.client.mli index f215940736..14f0a08d5a 100644 --- a/src/lib/eliom_lib.client.mli +++ b/src/lib/eliom_lib.client.mli @@ -19,6 +19,8 @@ (** Eliom standard library *) +open Js_of_ocaml + (** See {% <> %}. *) include module type of Ocsigen_lib_base with type poly = Ocsigen_lib.poly diff --git a/src/lib/eliom_parameter.client.ml b/src/lib/eliom_parameter.client.ml index 4454778e3b..8e5e60721b 100644 --- a/src/lib/eliom_parameter.client.ml +++ b/src/lib/eliom_parameter.client.ml @@ -17,6 +17,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) +open Js_of_ocaml + include Eliom_parameter_base type raw_post_data = unit diff --git a/src/lib/eliom_parameter.client.mli b/src/lib/eliom_parameter.client.mli index 20cd06ddf9..c4b7a017b9 100644 --- a/src/lib/eliom_parameter.client.mli +++ b/src/lib/eliom_parameter.client.mli @@ -17,6 +17,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) +open Js_of_ocaml + include Eliom_parameter_sigs.S with type raw_post_data = unit (** Specifying parameter as [user_type ~of_string ~to_string s] tells diff --git a/src/lib/eliom_process.client.ml b/src/lib/eliom_process.client.ml index ab5af3439b..f216707fb8 100644 --- a/src/lib/eliom_process.client.ml +++ b/src/lib/eliom_process.client.ml @@ -17,6 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) +open Js_of_ocaml open Eliom_lib open Ocsigen_cookies diff --git a/src/lib/eliom_request.client.ml b/src/lib/eliom_request.client.ml index f1a8876f93..20a18057a2 100644 --- a/src/lib/eliom_request.client.ml +++ b/src/lib/eliom_request.client.ml @@ -17,6 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) +open Js_of_ocaml open Eliom_lib exception Looping_redirection diff --git a/src/lib/eliom_request.client.mli b/src/lib/eliom_request.client.mli index db7d85ed09..46897a933f 100644 --- a/src/lib/eliom_request.client.mli +++ b/src/lib/eliom_request.client.mli @@ -17,6 +17,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) +open Js_of_ocaml + exception Looping_redirection exception Failed_request of int exception Program_terminated diff --git a/src/lib/eliom_request_info.client.ml b/src/lib/eliom_request_info.client.ml index 7015d72422..4cb1fd1808 100644 --- a/src/lib/eliom_request_info.client.ml +++ b/src/lib/eliom_request_info.client.ml @@ -26,6 +26,7 @@ - Antother part is sent with each request *) +open Js_of_ocaml open Eliom_lib let (>>>) x f = f x diff --git a/src/lib/eliom_runtime.shared.ml b/src/lib/eliom_runtime.shared.ml index 976c7879da..fce9f00b18 100644 --- a/src/lib/eliom_runtime.shared.ml +++ b/src/lib/eliom_runtime.shared.ml @@ -20,6 +20,8 @@ (**/**) +open Js_of_ocaml + module Client_value_server_repr = struct type u = { diff --git a/src/lib/eliom_runtime.shared.mli b/src/lib/eliom_runtime.shared.mli index 5145d3b252..c33a43afca 100644 --- a/src/lib/eliom_runtime.shared.mli +++ b/src/lib/eliom_runtime.shared.mli @@ -20,6 +20,7 @@ (**/**) +open Js_of_ocaml (** Server representation of client values. Developer-visible functions should always operate on diff --git a/src/lib/eliom_shared_content.eliom b/src/lib/eliom_shared_content.eliom index b679dd608a..a1d53820c6 100644 --- a/src/lib/eliom_shared_content.eliom +++ b/src/lib/eliom_shared_content.eliom @@ -18,6 +18,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) +open%shared Js_of_ocaml + [%%server open Eliom_shared let local_value s = React.S.value s |> Value.local diff --git a/src/lib/eliom_shared_content.eliomi b/src/lib/eliom_shared_content.eliomi index 2b000554bb..5cfca4a126 100644 --- a/src/lib/eliom_shared_content.eliomi +++ b/src/lib/eliom_shared_content.eliomi @@ -18,6 +18,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) +open Js_of_ocaml + module Xml : Xml_sigs.T with type 'a W.t = 'a Eliom_shared.React.S.t and type 'a W.tlist = 'a Eliom_shared.ReactiveData.RList.t diff --git a/src/lib/eliom_unwrap.client.ml b/src/lib/eliom_unwrap.client.ml index 98feb4f052..ee8821a7ea 100644 --- a/src/lib/eliom_unwrap.client.ml +++ b/src/lib/eliom_unwrap.client.ml @@ -31,6 +31,7 @@ let weakMap : ('a,'b) weakMap Js.t Js.constr = Js.Unsafe.global##_WeakMap let map : (Obj.t,Obj.t) weakMap Js.t = jsnew weakMap () *) +open Js_of_ocaml open Eliom_lib let section = Lwt_log.Section.make "eliom:unwrap" diff --git a/src/lib/eliom_unwrap.client.mli b/src/lib/eliom_unwrap.client.mli index 0ce7f85726..1053cbc662 100644 --- a/src/lib/eliom_unwrap.client.mli +++ b/src/lib/eliom_unwrap.client.mli @@ -17,6 +17,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) +open Js_of_ocaml + (** Values of type [unwrap_id] are used to identify a specific unwrapper. *) type unwrap_id From 221e9b1c98ca2378651941bdddf3ed6c97663e53 Mon Sep 17 00:00:00 2001 From: Jan Rochel Date: Fri, 7 Dec 2018 16:45:22 +0100 Subject: [PATCH 4/5] raise lower version bounds of js_of_ocaml and tyxml --- opam | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/opam b/opam index 65567512e2..ef5bdea89d 100644 --- a/opam +++ b/opam @@ -16,16 +16,16 @@ depends: [ "deriving" {>= "0.6"} "ppx_deriving" "ppx_tools" {>= "0.99.3"} - "js_of_ocaml" {>= "3.0" & < "3.3"} - "js_of_ocaml-lwt" {< "3.3"} + "js_of_ocaml" {>= "3.3"} + "js_of_ocaml-lwt" {>= "3.3"} "js_of_ocaml-ocamlbuild" {build} "js_of_ocaml-ppx" - "js_of_ocaml-ppx" {<= "3.0.2"} | "js_of_ocaml-ppx_deriving_json" - "js_of_ocaml-tyxml" {< "3.2.0"} + "js_of_ocaml-ppx_deriving_json" {>= "3.3"} + "js_of_ocaml-tyxml" {>= "3.3"} "lwt_log" "lwt_ppx" "lwt_camlp4" - "tyxml" {>= "4.0.0" & < "4.3.0"} + "tyxml" {>= "4.3.0"} "ocsigenserver" {>= "2.10"} "ipaddr" {>= "2.1"} "reactiveData" {>= "0.2.1"} From e154932bbcdfb041e5f52dcb54927e72da2f7910 Mon Sep 17 00:00:00 2001 From: Jan Rochel Date: Tue, 18 Dec 2018 16:59:31 +0100 Subject: [PATCH 5/5] release 6.5.0 --- CHANGES | 4 ++++ opam | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 0cf7197c35..9a4db9fa98 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +===== 6.5 (2018-12-18) ===== + +* Compatibility with tyxml.4.3.x and js_of_caml.3.3.x + ===== 6.4 (2018-12-17) ===== * Compatibility with Lwt 4.x diff --git a/opam b/opam index ef5bdea89d..60bfe7a3c8 100644 --- a/opam +++ b/opam @@ -1,6 +1,6 @@ opam-version: "2.0" name: "eliom" -version: "6.4.0" +version: "6.5.0" maintainer: "dev@ocsigen.org" authors: "dev@ocsigen.org" synopsis: "Client/server Web framework"