package tiny_httpd
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=ef806444b2f9e53d10976b9124902560d0855124433537080e6d0bec48d202e5
sha512=539530eb9e511b6ed4d69bb083f421d5f51b183c347c116a52f24210f30b1c9b14a029e2b82d6e0d698c74ab75ba5c307a1976711558a1419df287335b2a8f51
doc/tiny_httpd.html/Tiny_httpd_html/index.html
Module Tiny_httpd_html
Source
HTML combinators.
This module provides combinators to produce html. It doesn't enforce the well-formedness of the html, unlike Tyxml, but it's simple and should be reasonably efficient.
An attribute, i.e. a key/value pair
A html element. It is represented by its output function, so we can directly print it.
Element with children, represented as a list.
A chunk of sub-elements, possibly empty.
Element with children, represented as a list of sub_elt
to be flattened
Sub-element with nothing inside. Useful in conditionals, when one decides not to emit a sub-element at all.
Formatted version of txt
Emit raw HTML. Caution, this can lead to injection vulnerabilities, never use with text that comes from untrusted users.
tag "menuitem", see mdn
tag "footer", see mdn
tag "footer", see mdn
tag "menu", see mdn
tag "menu", see mdn
tag "nav", see mdn
tag "nav", see mdn
Write an HTML element to this output.
Convert a list of HTML elements to a string. This is designed for fragments of HTML that are to be injected inside a bigger context, as it's invalid to have multiple elements at the toplevel of a HTML document.
Write a toplevel element to an output channel.
Produce a streaming writer from this HTML element.
Convert a HTML element to a stream. This might just convert it to a string first, do not assume it to be more efficient.