package ezjs_extension
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Binding for Chrome and Firefox extension API
Install
dune-project
Dependency
Authors
Maintainers
Sources
0.1.tar.gz
md5=0d1dc7175a620eb50c07f2bbe0531533
sha512=5742b4e64398533c95291fe7c9b5ed3e264214dee7522fec1a0074766afd40e633aa1ceea16cbc6923ab80d737a15c13b50b96d4ddf8fad8ec74c30816877c9a
doc/src/ezjs_extension.chrome-lwt/runtime_chrome_lwt.ml.html
Source file runtime_chrome_lwt.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32open Ezjs_min_lwt open Promise include Chrome_common.Runtime let getBackgroundPage () = to_lwt_cb (fun cb -> runtime##getBackgroundPage cb) let openOptionsPage ?callback () = to_lwt_cb_opt callback (fun cb -> runtime##openOptionsPage cb) let setUninstallURL ?callback s = to_lwt_cb_opt callback (fun cb -> runtime##setUninstallURL s cb) let requestUpdateCheck () = to_lwt_cb (fun cb -> runtime##requestUpdateCheck cb) let restartAfterDelay ?callback i = to_lwt_cb_opt callback (fun cb -> runtime##restartAfterDelay i cb) let sendMessage ?id ?options ?callback message = match callback with | Some callback -> let waiter, notifier = Lwt.wait () in runtime##sendMessage (Optdef.option id) message (Optdef.option options) (def (Lwt.wakeup notifier)); waiter >>= fun x -> return (Some (callback x)) | None -> runtime##sendMessage (Optdef.option id) message (Optdef.option options) undefined; Lwt.return_none let sendNativeMessage ?callback application message = match callback with | Some callback -> let waiter, notifier = Lwt.wait () in runtime##sendNativeMessage (string application) message (def (Lwt.wakeup notifier)); waiter >>= fun x -> return (Some (callback x)) | None -> runtime##sendNativeMessage (string application) message undefined; Lwt.return_none let getPlatformInfo () = to_lwt_cb_tr Extension_utils.Runtime.to_platform_info (fun cb -> runtime##getPlatformInfo cb) let getPackageDirectoryEntry () = to_lwt_cb (fun cb -> runtime##getPackageDirectoryEntry cb)
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>