package virtual_dom

  1. Overview
  2. Docs

Module Virtual_dom_test_helpers.Node_helpersSource

Sourcetype t =
  1. | Text of string
  2. | Element of {
    1. tag_name : string;
    2. attributes : (string * string) list;
    3. string_properties : (string * string) list;
    4. handlers : (string * Handler.t) list;
    5. key : string option;
    6. children : t list;
    }
  3. | Widget of string

Roughly analogous to Vdom.Node.t, but more easily inspectable and represented as a pure OCaml type.

Sourceval sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
Sourceval map : t -> f:(t -> [ `Continue | `Replace_with of t ]) -> t
Sourceval is_tag : tag:string -> t -> bool
Sourceval has_class : cls:string -> t -> bool
Sourceval select : t -> selector:string -> t list
Sourceval select_first : t -> selector:string -> t option
Sourceval select_first_exn : t -> selector:string -> t
Sourceval to_string_html : t -> string
Sourceval unsafe_convert_exn : Virtual_dom.Vdom.Node.t -> t
Sourceval trigger : ?extra_fields:(string * Js_of_ocaml.Js.Unsafe.any) list -> t -> event_name:string -> unit
Sourcemodule User_actions : sig ... end

Convenience functions for trigger, closely modeling user interactions.