package bonsai
A library for building dynamic webapps, using Js_of_ocaml
Install
Dune Dependency
Authors
Maintainers
Sources
bonsai-v0.16.0.tar.gz
sha256=1d68aab713659951eba5b85f21d6f9382e0efa8579a02c3be65d9071c6e86303
doc/src/bonsai.web/to_incr_dom_intf.ml.html
Source file to_incr_dom_intf.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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
open! Core open! Async_kernel open Bonsai.For_open open! Import module type S = sig module Input : T module Model : sig type t [@@deriving equal, sexp] val default : t end module Extra : T module Action : sig type t [@@deriving sexp_of] end module State : sig type t val create : unit -> t end type t = (Action.t, Model.t, State.t, Extra.t) Incr_dom.Component.with_extra val create : input:Input.t Incr.t -> old_model:Model.t option Incr.t -> model:Model.t Incr.t -> inject:(Action.t -> unit Vdom.Effect.t) -> t Incr.t end module type To_incr_dom = sig (** A wrapper to use Bonsai components in Incr_dom apps. *) module type S = S val convert : ?optimize:bool -> ('input Value.t -> Vdom.Node.t Computation.t) -> (module S with type Input.t = 'input and type Extra.t = unit) val convert_with_extra : ?optimize:bool -> ('input Value.t -> (Vdom.Node.t * 'extra) Computation.t) -> (module S with type Input.t = 'input and type Extra.t = 'extra) end
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>