I’m not sure exactly what you are asking but:
- If you are asking about the way API are exposed:
brr
does not type JavaScript’s objects as phantom types. It simply relies on OCaml’s abstract data types and plain functions. More about this can be found in brr’s FFI manual and FFI cookbook. - If you are asking about binding coverage, you should be able to get a sense of what is bound in
brr
here.
Regarding 2. brr
's coverage of more recent browser APIs is broader and more consistent than in js_of_ocaml
– Promise support, Fetch, Service workers, Media capture APIs, WebGL2, Webcrypto, WebAudio, etc. Conversly older APIs supported in js_of_ocaml
may not supported in brr
(e.g. XMLHTTPRequest). Besides brr
's coverage of some of the DOM element-specific interfaces may be shallower than in js_of_ocaml
. There is however good coverage for the HTMLMediaElement
, HTMLCanvasElement
, HTMLFormElement
and HTMLInputElement
interfaces. For the rest the attribute and property API and the occasional trivial FFI method binding should be able to get you a long way.