The Js_of_ocaml distribution ships several opam packages, each providing one or more libraries. This page lists the public modules of every package; see the documentation home for the manual.
The top-level module of each library also states, in its own documentation, which opam package provides it.
js_of_ocaml — the base libraryProvided by the js_of_ocaml opam package (library js_of_ocaml).
Core runtime and JavaScript values:
Js_of_ocaml.Js Javascript bindingJs_of_ocaml.Js_error Js_of_ocaml.Jstable A minimal table implementation specialized for Js.js_string keys. This is faster than regular OCaml hashtables.Js_of_ocaml.Sys_js Javascript specific Sys functions.Js_of_ocaml.Typed_array Typed Array bindingJs_of_ocaml.Effect_js Javascript-specific effect functions.Browser APIs:
Js_of_ocaml.Abort AbortController / AbortSignal.Js_of_ocaml.CSS This module contains a few types and values to ease the use of CSS properties and such. If you think a feature is missing, consider sending a patch or an RFE to the mailing list.Js_of_ocaml.Console Console API (debugging console).Js_of_ocaml.Dom DOM bindingJs_of_ocaml.Dom_events Javascript eventsJs_of_ocaml.Dom_html DOM HTML bindingJs_of_ocaml.Dom_svg DOM SVG bindingJs_of_ocaml.EventSource EventSource bindingJs_of_ocaml.Fetch Fetch API.Js_of_ocaml.File File APIJs_of_ocaml.Form Js_of_ocaml.Geolocation Geolocation APIJs_of_ocaml.IntersectionObserver The Intersection Observer API provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element or with a top-level document's viewport.Js_of_ocaml.Intl Internationalization APIJs_of_ocaml.Json Unsafe IO. (See Deriving_Json for typesafe IO)Js_of_ocaml.MutationObserver MutationObserver APIJs_of_ocaml.Performance Performance APIJs_of_ocaml.PerformanceObserver PerformanceObserver APIJs_of_ocaml.Promise Bindings to the JavaScript Promise API.Js_of_ocaml.Regexp Types for regexps.Js_of_ocaml.ResizeObserver ResizeObserver APIJs_of_ocaml.Url This module provides functions for tampering with Url. It's main goal is to allow one to stay in the Ocaml realm without wandering into the Dom_html.window##.location object.Js_of_ocaml.WebGL WebGL bindingJs_of_ocaml.WebSockets WebSocket bindingJs_of_ocaml.Worker Low-level bindgins to javascript Web Workers.Js_of_ocaml.XmlHttpRequest XmlHttpRequest object.The same opam package also provides the js_of_ocaml.deriving library — the runtime used by the code that [@@deriving json] generates:
Deriving_Json Typesafe IO (based on the deriving library).Deriving_Json_lexer js_of_ocaml-lwt — Lwt supportProvided by the js_of_ocaml-lwt opam package (library js_of_ocaml-lwt).
Js_of_ocaml_lwt.Lwt_js — sleeping and yieldingJs_of_ocaml_lwt.Lwt_js_events — DOM events as Lwt threadsJs_of_ocaml_lwt.XmlHttpRequest — XMLHttpRequest with LwtJs_of_ocaml_lwt.Jsonp — JSONP requestsJs_of_ocaml_lwt.File — reading files with LwtJs_of_ocaml_lwt.Promise — bridge between Lwt threads and JS promisesjs_of_ocaml-ppx_deriving_json — JSON derivation syntaxProvided by the js_of_ocaml-ppx_deriving_json opam package. This is the PPX that derives JSON serializers ([@@deriving json]); the generated code relies on the Deriving_Json runtime from the js_of_ocaml package above. See the manual for usage.
js_of_ocaml-tyxml — TyXML supportProvided by the js_of_ocaml-tyxml opam package (library js_of_ocaml-tyxml).
Js_of_ocaml_tyxml.Tyxml_js — build and manipulate DOM trees with TyXMLJs_of_ocaml_tyxml.Tyxml_cast — cast between TyXML and Dom nodesJs_of_ocaml_tyxml.Tyxml_cast_sigs — signatures for the castsjs_of_ocaml-toplevel — toplevel and DynlinkProvided by the js_of_ocaml-toplevel opam package (library js_of_ocaml-toplevel).
Js_of_ocaml_toplevel.JsooTop — run an OCaml toplevel in the browser