Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example/example.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ open Js_of_ocaml
open Js_top_worker_rpc
module W = Js_top_worker_client.W

let log s = Firebug.console##log (Js.string s)
let log s = Console.console##log (Js.string s)

let initialise s callback =
let ( let* ) = Lwt_result.bind in
Expand Down
12 changes: 6 additions & 6 deletions lib/worker.cppo.ml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let optbind : 'a option -> ('a -> 'b option) -> 'b option = fun x fn -> match x

let log fmt =
Format.kasprintf
(fun s -> Js_of_ocaml.(Firebug.console##log (Js.string s)))
(fun s -> Js_of_ocaml.(Console.console##log (Js.string s)))
fmt

(* OCamlorg toplevel in a web worker
Expand Down Expand Up @@ -136,7 +136,7 @@ let sync_get url =
Js.Opt.case
(File.CoerceTo.arrayBuffer x##.response)
(fun () ->
Firebug.console##log (Js.string "Failed to receive file");
Console.console##log (Js.string "Failed to receive file");
None)
(fun b -> Some (Typed_array.String.of_arrayBuffer b))
| _ -> None
Expand Down Expand Up @@ -219,7 +219,7 @@ let init (init_libs : Toplevel_api_gen.init_libs) =
Some
(List.map
(fun func_name ->
Firebug.console##log (Js.string ("Function: " ^ func_name));
Console.console##log (Js.string ("Function: " ^ func_name));
let func = Js.Unsafe.js_expr func_name in
fun () ->
Js.Unsafe.fun_call func [| Js.Unsafe.inject Dom_html.window |])
Expand Down Expand Up @@ -376,14 +376,14 @@ let run () =
let open Js_of_ocaml in
try
(Js_top_worker_rpc.Idl.logfn :=
fun s -> Js_of_ocaml.(Firebug.console##log s));
fun s -> Js_of_ocaml.(Console.console##log s));
Server.complete complete;
Server.exec execute;
Server.setup setup;
Server.init init;
Server.typecheck typecheck_phrase;
let rpc_fn = IdlM.server Server.implementation in
Js_of_ocaml.Worker.set_onmessage (server rpc_fn);
Firebug.console##log (Js.string "All finished")
Console.console##log (Js.string "All finished")
with e ->
Firebug.console##log (Js.string ("Exception: " ^ Printexc.to_string e))
Console.console##log (Js.string ("Exception: " ^ Printexc.to_string e))