package brr

  1. Overview
  2. Docs
Browser programming toolkit for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

brr-0.0.8.tbz
sha512=49e7bfbad2ea6a0139354e4a33c59c8a113c4c1e20a4f629bc5cad24aa801e474b4af10ce35adbda5d23dd294d1de5efa5b10bb3030d03f4758459977250a0f6

doc/brr.ocaml_poke/Brr_ocaml_poke/index.html

Module Brr_ocaml_pokeSource

ocaml_poke object for OCaml console.

See the OCaml console manual for more information.

Poke objects

Sourcetype t

The type for OCaml poke objects. Note that the actual object may live in another global context.

Sourceval version : t -> int

version p is the version of the poke object interface.

Sourceval ocaml_version : t -> Jstr.t

ocaml_version p is the OCaml version being poked by p.

Sourceval jsoo_version : t -> Jstr.t

jsoo_version p is the js_of_ocaml version being poked by p.

eval expr evaluates the given OCaml toplevel phrase in the poke object and returns the result as a JSON string.

use phrases silently evaluates the given OCaml toplevel phrases in the poke object and returns possible errors via a JSON string.

Finding poke objects

Sourceval find : unit -> t option Fut.or_error

find () looks for and initalizes an OCaml poke object in the global context of the caller.

Sourceval 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.

OCaml

Innovation. Community. Security.