package tiny_httpd
Install
Dune Dependency
Authors
Maintainers
Sources
md5=9ceac00dcd214ad562446b81abbf6734
sha512=99b4d01d4f4d138b122c689b8b3bc5043fc386d6686675311f625bf5fec72c6e1a7513712b00889fe17cd392b8c475440d4f89ee46392aff32ac6ccc39cefe09
doc/tiny_httpd/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.
Output for HTML combinators.
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
Attributes.
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.
Convert a HTML element to a stream. This might just convert it to a string first, do not assume it to be more efficient.