Skip to content

Commit

Permalink
Fix use of deprecated APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
vouillon committed Sep 20, 2024
1 parent 5e9ce77 commit 7fe6bfc
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion libs/amcharts3/amcharts3.ml
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ class type amCharts =

let amCharts() =
let amCharts : amCharts Js.t =
Js.Unsafe.variable "AmCharts"
Js.Unsafe.global ##. _AmCharts
in
amCharts

Expand Down
2 changes: 1 addition & 1 deletion libs/amcharts3/amcharts3_bis.ml
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ class type amCharts =
end

let amCharts () =
let amCharts : amCharts Js.t = Js.Unsafe.variable "AmCharts" in
let amCharts : amCharts Js.t = Js.Unsafe.global ##. _AmCharts in
amCharts

let export ?divId () =
Expand Down
2 changes: 1 addition & 1 deletion libs/amcharts3/ammap3.ml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class type amCharts =

let amCharts() =
let amCharts : amCharts Js.t =
Js.Unsafe.variable "AmCharts"
Js.Unsafe.global ##. _AmCharts
in
amCharts

Expand Down
4 changes: 2 additions & 2 deletions libs/disqus/ezjs_disqus.ml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ let build_config ?(lang="en") ?title url identifier () =
let title = match title with
| None -> Printf.sprintf "Thread for %s" identifier
| Some title -> title in
let disqus : disqus Js.t = Js.Unsafe.variable "DISQUS" in
let disqus : disqus Js.t = Js.Unsafe.global ##. _DISQUS in
let page_config : page Js.t = Js.Unsafe.obj [||] in
page_config##.identifier := Js.string identifier;
page_config##.url := Js.string url;
Expand All @@ -42,7 +42,7 @@ let init ?lang ?title url identifier name =
Dom.appendChild doc##.body s

let reset ?lang ?title url identifier =
let disqus : disqus Js.t = Js.Unsafe.variable "DISQUS" in
let disqus : disqus Js.t = Js.Unsafe.global ##. _DISQUS in
let disqus_obj : disqus_reset Js.t = Js.Unsafe.obj [||] in
disqus_obj##.reload := Js._true;
disqus_obj##.config := build_config ?lang ?title url identifier;
Expand Down
6 changes: 3 additions & 3 deletions libs/google_auth/ezjs_gauth.ml
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,13 @@ type auth_response = {
let verbose = ref false
let set_verbose v = verbose := v

let gapi : gapi t optdef = Unsafe.variable "gapi"
let gapi : gapi t optdef = Unsafe.global ##. gapi

let ready ?(none=fun () -> if !verbose then log_str "cannot find gapi")
?(timeout=500.) (f : gapi t -> unit) =
match Optdef.to_option (Unsafe.variable "gapi") with
match Optdef.to_option (Unsafe.global ##. gapi) with
| None ->
let cb () = Optdef.case (Unsafe.variable "gapi") none f in
let cb () = Optdef.case (Unsafe.global ##. gapi) none f in
ignore @@ Dom_html.window##setTimeout (wrap_callback cb) timeout
| Some gapi -> f gapi

Expand Down
2 changes: 1 addition & 1 deletion libs/utils/ezjs_tyxml.ml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type 'a elt = 'a Html.elt

open Js

exception JsError = Error
exception JsError = Js_error.Exn
type ('a, 'b) result = ('a, 'b) Stdlib.result = Ok of 'a | Error of 'b

let doc = Dom_html.document
Expand Down
2 changes: 1 addition & 1 deletion libs/utils/ezjs_tyxml.mli
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type 'a elt = 'a Html.elt

open Js

exception JsError of error t
exception JsError of Js_error.t
type ('a, 'b) result = ('a, 'b) Stdlib.result = Ok of 'a | Error of 'b

val alert: string -> unit
Expand Down

0 comments on commit 7fe6bfc

Please sign in to comment.