Htmlit.At
HTML attributes.
See the attribute constructors.
v n value
is an attribute named n
with value value
. Favour use of attribute constructors whenever possible.
true' n
is v n ""
. This sets the boolean attribute n
to true. The attribute must be omitted to be false. See also if'
and if_some
.
val is_void : t -> bool
is_void at
is true
iff the name of at
is empty. These attributes render nothing. See also void
.
equal at0 at1
is true
if both the name and value of at0
and at1
are String
.equal.
val to_pair : t -> string * string
to_pair at
is (n, v)
the name and value of the attribute.
val of_pair : (string * string) -> t
of_pair (n, value)
is v n value
.
val pp : Stdlib.Format.formatter -> t -> unit
pp ppf at
formats at
on ppf
using HTML syntax. is_void
attributes format nothing.
See the MDN HTML attribute reference.
type 'a cons = 'a -> t
The type for attribute constructors with attribute values of type 'a
.
val autocomplete : string cons
val contenteditable : bool cons
val placeholder : string cons
val spellcheck : string cons