Skip to content

Commit 944a2b3

Browse files
hhugosmorimoto
authored andcommitted
Firebug -> Console
1 parent b6fd126 commit 944a2b3

File tree

4 files changed

+25
-25
lines changed

4 files changed

+25
-25
lines changed

src/lib/client/eliommod_dom.ml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ let fast_select_request_nodes root =
104104

105105
let fast_select_nodes root =
106106
if !Eliom_config.debug_timings
107-
then Firebug.console ## (time (Js.string "fast_select_nodes"));
107+
then Console.console ## (time (Js.string "fast_select_nodes"));
108108
let a_nodeList : Dom_html.element Dom.nodeList Js.t =
109109
root
110110
## (querySelectorAll
@@ -137,7 +137,7 @@ let fast_select_nodes root =
137137
(Js.string ("." ^ Eliom_runtime.RawXML.ce_registered_attr_class)))
138138
in
139139
if !Eliom_config.debug_timings
140-
then Firebug.console ## (timeEnd (Js.string "fast_select_nodes"));
140+
then Console.console ## (timeEnd (Js.string "fast_select_nodes"));
141141
( a_nodeList
142142
, form_nodeList
143143
, process_node_nodeList
@@ -581,13 +581,13 @@ let rec rewrite_css ~max (media, href, css) =
581581
| None -> Lwt.return_nil
582582
| Some css ->
583583
if !Eliom_config.debug_timings
584-
then Firebug.console ## (time (Js.string ("rewrite_CSS: " ^ href)));
584+
then Console.console ## (time (Js.string ("rewrite_CSS: " ^ href)));
585585
let* imports, css =
586586
rewrite_css_import ~max ~prefix:(basedir href) ~media css 0
587587
in
588588
if !Eliom_config.debug_timings
589589
then
590-
Firebug.console ## (timeEnd (Js.string ("rewrite_CSS: " ^ href)));
590+
Console.console ## (timeEnd (Js.string ("rewrite_CSS: " ^ href)));
591591
Lwt.return (imports @ [media, css]))
592592
(fun _ -> Lwt.return [media, Printf.sprintf "@import url(%s);" href])
593593

@@ -663,7 +663,7 @@ let build_style (e, css) =
663663

664664
let preload_css (doc : Dom_html.element Js.t) =
665665
if !Eliom_config.debug_timings
666-
then Firebug.console ## (time (Js.string "preload_css (fetch+rewrite)"));
666+
then Console.console ## (time (Js.string "preload_css (fetch+rewrite)"));
667667
let* css = Lwt_list.map_p build_style (fetch_linked_css (get_head doc)) in
668668
let css = List.concat css in
669669
List.iter
@@ -675,7 +675,7 @@ let preload_css (doc : Dom_html.element Js.t) =
675675
Lwt_log.ign_info ~section "Unique CSS skipped...")
676676
css;
677677
if !Eliom_config.debug_timings
678-
then Firebug.console ## (timeEnd (Js.string "preload_css (fetch+rewrite)"));
678+
then Console.console ## (timeEnd (Js.string "preload_css (fetch+rewrite)"));
679679
Lwt.return_unit
680680

681681
(** Window scrolling *)

src/lib/eliom_client.client.ml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ let check_global_data global_data =
107107
| [] -> ()
108108
| l ->
109109
Printf.ksprintf
110-
(fun s -> Firebug.console ## (error (Js.string s)))
110+
(fun s -> Console.console ## (error (Js.string s)))
111111
"Code generating the following client values is not linked on the client:\n%s"
112112
(String.concat "\n"
113113
(List.rev_map
@@ -128,7 +128,7 @@ let check_global_data global_data =
128128
| [] -> ()
129129
| l ->
130130
Printf.ksprintf
131-
(fun s -> Firebug.console ## (error (Js.string s)))
131+
(fun s -> Console.console ## (error (Js.string s)))
132132
"Code containing the following injections is not linked on the client:\n%s"
133133
(String.concat "\n"
134134
(List.rev_map
@@ -260,12 +260,12 @@ let relink_request_node (node : Dom_html.element Js.t) =
260260
let relink_request_nodes root =
261261
Lwt_log.ign_debug ~section "Relink request nodes";
262262
if !Eliom_config.debug_timings
263-
then Firebug.console ## (time (Js.string "relink_request_nodes"));
263+
then Console.console ## (time (Js.string "relink_request_nodes"));
264264
Eliommod_dom.iter_nodeList
265265
(Eliommod_dom.select_request_nodes root)
266266
relink_request_node;
267267
if !Eliom_config.debug_timings
268-
then Firebug.console ## (timeEnd (Js.string "relink_request_nodes"))
268+
then Console.console ## (timeEnd (Js.string "relink_request_nodes"))
269269

270270
(* Relinks a-elements, form-elements, and process nodes. The list of
271271
closure nodes is returned for application on [relink_closure_node]
@@ -405,12 +405,12 @@ let load_data_script page =
405405
in
406406
let script = data_script##.text in
407407
if !Eliom_config.debug_timings
408-
then Firebug.console ## (time (Js.string "load_data_script"));
408+
then Console.console ## (time (Js.string "load_data_script"));
409409
ignore (Js.Unsafe.eval_string (Js.to_string script));
410410
Eliom_process.reset_request_template ();
411411
Eliom_process.reset_request_cookies ();
412412
if !Eliom_config.debug_timings
413-
then Firebug.console ## (timeEnd (Js.string "load_data_script"))
413+
then Console.console ## (timeEnd (Js.string "load_data_script"))
414414

415415
(* == Scroll the current page such that the top of element with the id
416416
[fragment] is aligned with the window's top. If the optional
@@ -1004,7 +1004,7 @@ let init () =
10041004
Eliom_client_core.set_initial_load ();
10051005
Lwt.async (fun () ->
10061006
if !Eliom_config.debug_timings
1007-
then Firebug.console ## (time (Js.string "onload"));
1007+
then Console.console ## (time (Js.string "onload"));
10081008
let* () =
10091009
Eliom_request_info.set_session_info
10101010
~uri:
@@ -1043,7 +1043,7 @@ let init () =
10431043
Lwt_mutex.unlock Eliom_client_core.load_mutex;
10441044
run_callbacks load_callbacks;
10451045
if !Eliom_config.debug_timings
1046-
then Firebug.console ## (timeEnd (Js.string "onload"));
1046+
then Console.console ## (timeEnd (Js.string "onload"));
10471047
Lwt.return_unit);
10481048
Js._false
10491049
in
@@ -1459,7 +1459,7 @@ let set_uri ~replace ?fragment uri =
14591459

14601460
let replace_page ~do_insert_base new_page =
14611461
if !Eliom_config.debug_timings
1462-
then Firebug.console ## (time (Js.string "replace_page"));
1462+
then Console.console ## (time (Js.string "replace_page"));
14631463
if !only_replace_body
14641464
then
14651465
let new_body = new_page ##. childNodes ## (item 1) in
@@ -1475,7 +1475,7 @@ let replace_page ~do_insert_base new_page =
14751475
Dom.replaceChild Dom_html.document new_page
14761476
Dom_html.document##.documentElement);
14771477
if !Eliom_config.debug_timings
1478-
then Firebug.console ## (timeEnd (Js.string "replace_page"))
1478+
then Console.console ## (timeEnd (Js.string "replace_page"))
14791479

14801480
(* Function to be called for client side services: *)
14811481
let set_content_local ?offset ?fragment new_page =
@@ -1484,7 +1484,7 @@ let set_content_local ?offset ?fragment new_page =
14841484
let recover () =
14851485
if !locked then Lwt_mutex.unlock Eliom_client_core.load_mutex;
14861486
if !Eliom_config.debug_timings
1487-
then Firebug.console ## (timeEnd (Js.string "set_content_local"))
1487+
then Console.console ## (timeEnd (Js.string "set_content_local"))
14881488
and really_set () =
14891489
(* Inline CSS in the header to avoid the "flashing effect".
14901490
Otherwise, the browser start to display the page before
@@ -1510,7 +1510,7 @@ let set_content_local ?offset ?fragment new_page =
15101510
scroll_to_fragment ?offset fragment;
15111511
advance_page ();
15121512
if !Eliom_config.debug_timings
1513-
then Firebug.console ## (timeEnd (Js.string "set_content_local"));
1513+
then Console.console ## (timeEnd (Js.string "set_content_local"));
15141514
Lwt.return_unit
15151515
in
15161516
let cancel () = recover (); Lwt.return_unit in
@@ -1519,7 +1519,7 @@ let set_content_local ?offset ?fragment new_page =
15191519
let* () = Lwt_mutex.lock Eliom_client_core.load_mutex in
15201520
Eliom_client_core.set_loading_phase ();
15211521
if !Eliom_config.debug_timings
1522-
then Firebug.console ## (time (Js.string "set_content_local"));
1522+
then Console.console ## (time (Js.string "set_content_local"));
15231523
run_onunload_wrapper really_set cancel)
15241524
(fun exn ->
15251525
recover ();
@@ -1619,19 +1619,19 @@ let set_content ~replace ~uri ?offset ?fragment content =
16191619
scroll_to_fragment ?offset fragment;
16201620
advance_page ();
16211621
if !Eliom_config.debug_timings
1622-
then Firebug.console ## (timeEnd (Js.string "set_content"));
1622+
then Console.console ## (timeEnd (Js.string "set_content"));
16231623
Lwt.return_unit
16241624
and recover () =
16251625
if !locked then Lwt_mutex.unlock Eliom_client_core.load_mutex;
16261626
if !Eliom_config.debug_timings
1627-
then Firebug.console ## (timeEnd (Js.string "set_content"))
1627+
then Console.console ## (timeEnd (Js.string "set_content"))
16281628
in
16291629
Lwt.catch
16301630
(fun () ->
16311631
let* () = Lwt_mutex.lock Eliom_client_core.load_mutex in
16321632
Eliom_client_core.set_loading_phase ();
16331633
if !Eliom_config.debug_timings
1634-
then Firebug.console ## (time (Js.string "set_content"));
1634+
then Console.console ## (time (Js.string "set_content"));
16351635
let g () = recover (); Lwt.return_unit in
16361636
run_onunload_wrapper really_set g)
16371637
(fun exn ->

src/lib/eliom_lib.client.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ let _ =
9595
Lwt_log.default := Lwt_log.console;
9696
Lwt.async_exception_hook :=
9797
fun exn ->
98-
Firebug.console##error_3 (Js.string "Lwt.async:")
98+
Console.console##error_3 (Js.string "Lwt.async:")
9999
(Js.string (Printexc.to_string exn))
100100
exn
101101

src/lib/eliom_unwrap.client.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ external raw_unmarshal_and_unwrap :
8585

8686
let unwrap s i =
8787
if !Eliom_config.debug_timings
88-
then Firebug.console ## (time (Js.string "unwrap"));
88+
then Console.console ## (time (Js.string "unwrap"));
8989
let res = raw_unmarshal_and_unwrap apply_unwrapper s i in
9090
if !Eliom_config.debug_timings
91-
then Firebug.console ## (timeEnd (Js.string "unwrap"));
91+
then Console.console ## (timeEnd (Js.string "unwrap"));
9292
res
9393

9494
let unwrap_js s = unwrap (Js.to_bytestring s) 0

0 commit comments

Comments
 (0)