module Snabbdom_vnode:sig
..end
type
t
typetransformer =
t -> t
val empty : unit -> t
val set_sel : t -> string -> unit
val set_data : t -> Snabbdom_data.t -> unit
val set_children : t -> t array -> unit
val set_text : t -> string -> unit
val set_key : t -> string -> unit
val clear_text : t -> unit
val get_children : t -> t array option
val get_elm : t -> Dom.element option
val get_text : t -> string option
val set_in_data : string array -> 'a -> t -> t
Pass an array of strings representing the path to the property to be set, followed by the property value. Intermediate objects will be created if they don't already exist.
For example, to set the vnode's key property like the following (in JavaScript):
vnode.data.ns = "xyz"
Use:
let vnode = set_in_data [|"ns"|] "xyz" vnode
exception Element_with_id_not_found of string
Snabbdom_vnode.from_dom_id
is called with an
element id that does not exist.val from_dom_id : string -> t
This function may raise an Snabbdom_vnode.Element_with_id_not_found
exception.
val of_dom_element : Dom.element -> t
This function doesn't actually do anything at runtime.
Since the Snabbdom patch function allows us to use
an existing DOM element as an 'old' vnode, this function
just explicitly tells the compiler that we know what we're
doing.