Skip to content

Commit

Permalink
adding a function to get InAppBrowserEvent.data in the forme of a JSO…
Browse files Browse the repository at this point in the history
…N object
  • Loading branch information
Thibaut committed Jul 5, 2021
1 parent a4f89b6 commit 7388b7c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/cordova_in_app_browser.mli
Original file line number Diff line number Diff line change
Expand Up @@ -262,13 +262,19 @@ val data : inAppBrowserEvent -> string [@@js.get "data"]
(*Indicate to close an open InAppBrowser object*)
val close : inAppBrowser -> unit [@@js.call]

(*That function indicate if the plugin "cordova-InAppBrowser" is currently available*)
[@@@js.stop]

(*Return the "data" propertie of an inAppBrowserEvent in the form of an json object*)
val data_json : inAppBrowserEvent -> Ojs.t

(*That function indicate if the plugin "cordova-InAppBrowser" is currently available*)
val plugin_available : unit -> bool

[@@@js.start]

[@@@js.implem
let data_json evt = Js_of_ocaml.Js.Unsafe.global##._JSON##stringify (data evt)]

[@@@js.implem
let plugin_available () =
Js_of_ocaml.Js.Optdef.test
Expand Down

0 comments on commit 7388b7c

Please sign in to comment.