package tiny_httpd
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=eac8a3ca6e8cd463817e0c62c2cc8181b8ef705a97a7ac6afbbdceae30b42b54
sha512=e0ae94038b7d8f470133005437a1d2a620274fe13f15ce5521817751ae2603c1ed6f635a32a4b3a4ce4d9718f6d53cad6dfafa467a7b7554c86735a82fa1db25
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.
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.