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 -> ('model -> 'msg Vdom.t) -> ('msg -> 'model -> 'model * 'msg Command.t) -> ('model -> 'msg Subscription.t) -> ('model, 'msg) t
val view : ('model, 'msg) t -> 'msg Vdom.t
val update : 'msg -> ('model, 'msg) t -> unit
val do_command : ('model, 'msg) t -> 'msg Command.t -> unit
val make_event_handler : ('model, 'msg) t -> 'msg Decoder.t -> (Fmlib.Common.Void.t Js_of_ocaml.Js.t -> unit) Js_of_ocaml.Js.callback
val make_tree : ('model, 'msg) t -> 'msg Vdom.t -> 'msg 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 -> ('model -> 'msg Vdom.t) -> ('msg -> 'model -> 'model) -> unit
val element : 'a Decoder.t -> ('a -> 'model * 'msg App.Command.t) -> ('model -> 'msg Vdom.t) -> ('msg -> 'model -> 'model * 'msg App.Command.t) -> ('model -> 'msg App.Subscription.t) -> unit
OCaml

Innovation. Community. Security.