Module Brr.Att

DOM element attributes.

Attributes

type name = Jstr.t

The type for attribute names.

type t = name * Jstr.t

The type for attributes.

val add_if : bool -> t -> t list -> t list

add_if b a l is a :: l if b is true and l otherwise

val add_some : name -> Jstr.t option -> t list -> t list

add_some n o l is v n a :: l if o is Some a and l otherwise.

Predefined attribute constructors and names

Convention. Whenever an attribute name conflicts with an OCaml keyword we prime them, see for example class'.

module Name : sig ... end

Attribute names.

val autofocus : t
val checked : t
val class' : Jstr.t -> t
val disabled : t
val for' : Jstr.t -> t
val height : int -> t
val href : Jstr.t -> t
val id : Jstr.t -> t
val name : Jstr.t -> t
val placeholder : Jstr.t -> t
val src : Jstr.t -> t
val tabindex : int -> t
val title : Jstr.t -> t
val type' : Jstr.t -> t
val value : Jstr.t -> t
val width : int -> t