Module Brr.Jprop

JavaScript properties.

type 'a t

The type for JavaScript properties of type 'a.

val v : undefined:'a -> Jstr.t list -> 'a t

v p : prop_type t is accessed via path p of type prop_type. Warning. Always constrain the type otherwise this is Obj.magic. p must be non-empty.

val get : 'a t -> _ Js_of_ocaml.Js.t -> 'a

get p o is the property p of object o if defined and p's undefined value otherwise.

val set : 'a t -> 'a -> _ Js_of_ocaml.Js.t -> unit

set p v o sets property p of object o to v.

Predefined properties

These properties all have an undefined value: Jstr.empty for strings, false for booleans, 0 for ints.

val checked : bool t
val height : int t
val id : Jstr.t t
val name : Jstr.t t
val title : Jstr.t t
val value : Jstr.t t
val width : int t