Skip to content

Commit a4dcc73

Browse files
authored
Merge pull request #689 from ocsigen/dom-html
Adapt to Js_of_ocaml 6.0
2 parents 2e41689 + 8077224 commit a4dcc73

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ jobs:
4040
ocaml-compiler: ${{ matrix.ocaml-compiler }}
4141
opam-pin: false
4242

43+
- run: |
44+
opam pin add -n eliom https://github.com/ocsigen/eliom.git
45+
opam pin add -n ocsigen-toolkit https://github.com/ocsigen/ocsigen-toolkit.git
46+
4347
- run: opam pin add ocsigen-start.7.0.0 . --no-action
4448

4549
- run: opam install .

opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ depends: [
3030
"yojson" {>= "1.6.0"}
3131
"resource-pooling" {>= "1.0" & < "2.0"}
3232
"cohttp-lwt-unix"
33-
"js_of_ocaml" {>= "5.5.0"}
33+
"js_of_ocaml" {>= "6.0.0"}
3434
"re" {>= "1.7.2"}
3535
]
3636
depexts: [

src/os_tips.eliom

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ let%client display_bubble ?(a = []) ?arrow ?top ?left ?right ?bottom ?height
219219
let* () = Lwt_js.sleep delay in
220220
let box = To_dom.of_element box in
221221
Dom.appendChild parent_node box;
222-
box##.style##.opacity := Js.def (Js.string "0");
222+
box##.style##.opacity := Js.string "0";
223223
Eliom_lib.Option.iter
224224
(fun v -> box##.style##.top := Js.string (Printf.sprintf "%ipx" v))
225225
top;
@@ -266,7 +266,7 @@ let%client display_bubble ?(a = []) ?arrow ?top ?left ?right ?bottom ?height
266266
bec##.style##.borderLeft := Js.string "none")
267267
arrow;
268268
let* () = Lwt_js_events.request_animation_frame () in
269-
box##.style##.opacity := Js.def (Js.string "1");
269+
box##.style##.opacity := Js.string "1";
270270
Lwt.return_unit
271271

272272
(* Function to be called on server to display a tip *)

template.distillery/PROJECT_NAME_mobile.eliom

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ let () =
6767
(* Reactivate comet on resume and online events *)
6868

6969
let () =
70-
Firebug.console##log (Js_of_ocaml.Js.string "adding resume/online listeners");
70+
Console.console##log (Js_of_ocaml.Js.string "adding resume/online listeners");
7171
let activate ev =
7272
ignore
7373
@@ Js_of_ocaml.Dom.addEventListener Js_of_ocaml.Dom_html.document
7474
(Js_of_ocaml.Dom_html.Event.make ev)
7575
(Js_of_ocaml.Dom_html.handler (fun _ ->
76-
Firebug.console##log (Js_of_ocaml.Js.string ev);
76+
Console.console##log (Js_of_ocaml.Js.string ev);
7777
Eliom_comet.activate ();
7878
Js_of_ocaml.Js._true))
7979
Js_of_ocaml.Js._false
@@ -127,15 +127,15 @@ let universal_links () =
127127
let _ =
128128
Lwt.bind (universal_links ()) (function
129129
| Some universal_links ->
130-
Js_of_ocaml.Firebug.console##log
130+
Js_of_ocaml.Console.console##log
131131
(Js_of_ocaml.Js.string "Universal links: registering");
132132
universal_links##subscribe Js_of_ocaml.Js.null
133133
(Js_of_ocaml.Js.wrap_callback (fun (ev : event Js_of_ocaml.Js.t) ->
134-
Js_of_ocaml.Firebug.console##log_2
134+
Js_of_ocaml.Console.console##log_2
135135
(Js_of_ocaml.Js.string "Universal links: got link")
136136
ev##.url;
137137
change_page_uri (Js_of_ocaml.Js.to_string ev##.url)));
138-
Js_of_ocaml.Firebug.console##log
138+
Js_of_ocaml.Console.console##log
139139
(Js_of_ocaml.Js.string "Universal links: registered");
140140
Lwt.return_unit
141141
| None -> Lwt.return_unit)

0 commit comments

Comments
 (0)