Module Brr.At
DOM element attributes.
Attributes
type name = Jstr.tThe type for attribute names.
val v : Brr.At.name -> Jstr.t -> Brr.At.tv n value is an attribute named n with value value.
val void : Brr.At.tvoid is an attribute that doesn't exist. It is ignored by functions like El.v. This is v Jstr.empty Jstr.empty.
val true' : Brr.At.name -> Brr.At.ttrue' n is v n Jstr.empty. This sets the boolean attribute n to true. The attribute must be omitted to be false.
val int : Brr.At.name -> int -> Brr.At.tint n i is v n (Jstr.of_int i).
val float : Brr.At.name -> float -> Brr.At.tfloat n f is v n (Jstr.of_float f).
add_if c att atts is att :: atts if c is true and atts otherwise.
val add_if_some :
Brr.At.name ->
Jstr.t option ->
Brr.At.t list ->
Brr.At.t listadd_if_some n o atts is (v n value) :: atts if o is Some value and atts otherwise.
Attribute names and constructors
See the MDN HTML attribute reference.
Convention. Whenever an attribute name conflicts with an OCaml keyword we prime it, see for example class'.
module Name : sig ... endAttribute names.
type 'a cons = 'a -> Brr.At.tThe type for attribute constructors with value of type 'a.
val accesskey : Jstr.t Brr.At.consval action : Jstr.t Brr.At.consval autocomplete : Jstr.t Brr.At.consval charset : Jstr.t Brr.At.consval class' : Jstr.t Brr.At.consval cols : int Brr.At.consval content : Jstr.t Brr.At.consval contenteditable : bool Brr.At.consval dir : Jstr.t Brr.At.consval download : Jstr.t Brr.At.consval draggable : Jstr.t Brr.At.consval for' : Jstr.t Brr.At.consval height : int Brr.At.consval href : Jstr.t Brr.At.consval id : Jstr.t Brr.At.consval lang : Jstr.t Brr.At.consval list : Jstr.t Brr.At.consval media : Jstr.t Brr.At.consval method' : Jstr.t Brr.At.consval name : Jstr.t Brr.At.consval placeholder : Jstr.t Brr.At.consval rel : Jstr.t Brr.At.consval rows : int Brr.At.consval spellcheck : Jstr.t Brr.At.consval src : Jstr.t Brr.At.consval style : Jstr.t Brr.At.consval tabindex : int Brr.At.consval title : Jstr.t Brr.At.consval type' : Jstr.t Brr.At.consval value : Jstr.t Brr.At.consval wrap : Jstr.t Brr.At.consval width : int Brr.At.cons