package alba

  1. Overview
  2. Docs

Parameters

Signature

module Vdom = App.Dom
module Command = App.Command
module Subscription = App.Subscription
module Tree : sig ... end
type ('model, 'msg) t = {
  1. window : window Js_of_ocaml.Js.t;
  2. root : node Js_of_ocaml.Js.t;
  3. view : 'model -> 'msg Vdom.t;
  4. update : 'msg -> 'model -> 'model * 'msg Command.t;
  5. subscription : 'model -> 'msg Subscription.t;
  6. mutable model : 'model;
  7. mutable dirty : bool;
  8. mutable tree : 'msg Tree.t option;
}
val make : window Js_of_ocaml.Js.t -> node Js_of_ocaml.Js.t -> 'model -> ('model0 -> 'msg Vdom.t) -> ('msg0 -> 'model1 -> 'model1 * 'msg0 Command.t) -> ('model2 -> 'msg1 Subscription.t) -> ('model3, 'msg2) t
val view : ('model, 'msg) t -> 'msg0 Vdom.t
val update : 'msg -> ('model, 'msg0) t -> unit
val do_command : ('model, 'msg) t -> 'msg0 Command.t -> unit
val make_event_handler : ('model, 'msg) t -> 'msg0 Decoder.t -> (Fmlib.Common.Void.t Js_of_ocaml.Js.t -> unit) Js_of_ocaml.Js.callback
val make_tree : ('model, 'msg) t -> 'msg0 Vdom.t -> 'msg1 Tree.t
val remove_children : node Js_of_ocaml.Js.t -> unit
val update_dom : ('model, 'msg) t -> unit
val animate : ('model, 'msg) t -> float -> unit
val sandbox : 'model -> ('model0 -> 'msg Vdom.t) -> ('msg0 -> 'model1 -> 'model1) -> unit
val element : 'a Decoder.t -> ('a0 -> 'model * 'msg App.Command.t) -> ('model0 -> 'msg0 Vdom.t) -> ('msg1 -> 'model1 -> 'model1 * 'msg1 App.Command.t) -> ('model2 -> 'msg2 App.Subscription.t) -> unit
OCaml

Innovation. Community. Security.