package brr
Browser programming toolkit for OCaml
Install
Dune Dependency
Authors
Maintainers
Sources
brr-0.0.7.tbz
sha512=4b3d42eb6a32c1d6f1c5ef003f5311b5029156b31f6e51af098b695c769699e0304b66afd2dd574ecf1084e095bbbc4eac552daab083766cd81ed2f1d9897d51
doc/brr.ocaml_poke/Brr_ocaml_poke/index.html
Module Brr_ocaml_poke
ocaml_poke
object for OCaml console.
See the OCaml console manual for more information.
Poke objects
The type for OCaml poke objects. Note that the actual object may live in another global context.
val version : t -> int
version p
is the version of the poke object interface.
val eval : t -> Jstr.t -> Brr.Json.t Fut.or_error
eval expr
evaluates the given OCaml toplevel phrase in the poke object and returns the result as a JSON string.
val use : t -> Jstr.t -> Brr.Json.t Fut.or_error
use phrases
silently evaluates the given OCaml toplevel phrases in the poke object and returns possible errors via a JSON string.
Finding poke objects
val find : unit -> t option Fut.or_error
find ()
looks for and initalizes an OCaml poke object in the global context of the caller.
val find_eval'd :
eval:(Jstr.t -> Brr.Json.t Fut.or_error) ->
t option Fut.or_error
find_eval'd
looks for and initializes an OCaml poke object by using the given JavaScript eval
function.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page