File tree Expand file tree Collapse file tree 7 files changed +10
-10
lines changed Expand file tree Collapse file tree 7 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -365,7 +365,7 @@ class type amCharts =
365
365
366
366
let amCharts() =
367
367
let amCharts : amCharts Js.t =
368
- Js.Unsafe. variable " AmCharts "
368
+ Js.Unsafe. global ##. _AmCharts
369
369
in
370
370
amCharts
371
371
Original file line number Diff line number Diff line change @@ -594,7 +594,7 @@ class type amCharts =
594
594
end
595
595
596
596
let amCharts () =
597
- let amCharts : amCharts Js.t = Js.Unsafe. variable " AmCharts " in
597
+ let amCharts : amCharts Js.t = Js.Unsafe. global ##. _AmCharts in
598
598
amCharts
599
599
600
600
let export ?divId () =
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ class type amCharts =
122
122
123
123
let amCharts() =
124
124
let amCharts : amCharts Js.t =
125
- Js.Unsafe. variable " AmCharts "
125
+ Js.Unsafe. global ##. _AmCharts
126
126
in
127
127
amCharts
128
128
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ let build_config ?(lang="en") ?title url identifier () =
23
23
let title = match title with
24
24
| None -> Printf. sprintf " Thread for %s" identifier
25
25
| Some title -> title in
26
- let disqus : disqus Js.t = Js.Unsafe. variable " DISQUS " in
26
+ let disqus : disqus Js.t = Js.Unsafe. global ##. _DISQUS in
27
27
let page_config : page Js.t = Js.Unsafe. obj [||] in
28
28
page_config##.identifier := Js. string identifier;
29
29
page_config##.url := Js. string url;
@@ -42,7 +42,7 @@ let init ?lang ?title url identifier name =
42
42
Dom. appendChild doc##.body s
43
43
44
44
let reset ?lang ?title url identifier =
45
- let disqus : disqus Js.t = Js.Unsafe. variable " DISQUS " in
45
+ let disqus : disqus Js.t = Js.Unsafe. global ##. _DISQUS in
46
46
let disqus_obj : disqus_reset Js.t = Js.Unsafe. obj [||] in
47
47
disqus_obj##.reload := Js. _true;
48
48
disqus_obj##.config := build_config ?lang ?title url identifier;
Original file line number Diff line number Diff line change @@ -212,13 +212,13 @@ type auth_response = {
212
212
let verbose = ref false
213
213
let set_verbose v = verbose := v
214
214
215
- let gapi : gapi t optdef = Unsafe. variable " gapi"
215
+ let gapi : gapi t optdef = Unsafe. global ##. gapi
216
216
217
217
let ready ?(none =fun () -> if ! verbose then log_str " cannot find gapi" )
218
218
?(timeout =500. ) (f : gapi t -> unit ) =
219
- match Optdef. to_option (Unsafe. variable " gapi" ) with
219
+ match Optdef. to_option (Unsafe. global ##. gapi) with
220
220
| None ->
221
- let cb () = Optdef. case (Unsafe. variable " gapi" ) none f in
221
+ let cb () = Optdef. case (Unsafe. global ##. gapi) none f in
222
222
ignore @@ Dom_html. window##setTimeout (wrap_callback cb) timeout
223
223
| Some gapi -> f gapi
224
224
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ type 'a elt = 'a Html.elt
34
34
35
35
open Js
36
36
37
- exception JsError = Error
37
+ exception JsError = Js_error. Exn
38
38
type ('a, 'b) result = ('a , 'b ) Stdlib .result = Ok of 'a | Error of 'b
39
39
40
40
let doc = Dom_html. document
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ type 'a elt = 'a Html.elt
34
34
35
35
open Js
36
36
37
- exception JsError of error t
37
+ exception JsError of Js_error. t
38
38
type ('a, 'b) result = ('a , 'b ) Stdlib .result = Ok of 'a | Error of 'b
39
39
40
40
val alert : string -> unit
You can’t perform that action at this time.
0 commit comments