package b0
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=dadde8cfa62be9dabd805fc190b415427b4699ffe3458c153e2f3f9cc5c9b9b4
md5=f96ac96fb0182f2b97dbe9ded452544b
doc/b0.care/B0_web/Htmlg/El/index.html
Module Htmlg.El
Elements.
Elements
v n ~a cs
is an element with name n
, attributes a
(defaults to []
) and children cs
. It is illegal to specify an attribute name more than once in a
except for Att.class'
which is treated specially: multiple specifications are gathered to form a single space seperated attribute value for the class attribute.
val txt : string -> child
txt d
is character data d
.
val raw : string -> child
raw s
is the raw string s
without escaping markup delimiters. This can be used to include foreign markup.
Output
buffer_add ~doc_type b c
adds child c
(or children if c
is a splice
) to b
. If doc_type
is true
an HTML doctype declaration is prepended.
val to_string : doc_type:bool -> child -> string
to_string
is like buffer_add
but returns directly a string.
Predefined element constructors
Convention. Whenever an element name conflicts with an OCaml keyword we prime it, see for example object'
.
The type for element constructors. This is simply v
with a pre-applied element name.
The type for void element constructors. This is simply el
with a pre-applied element name and without children.
val blockquote : cons
val figcaption : cons