package tiny_httpd
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=55b6eed7d2e41b9b2a282b344e01ca010abdba66cbbbbe5adab18303b9ff8360
sha512=98c599627b9cd98f641d389e022f9ddc025bfba838793267904b94a01b0b40b3b4cfd8f5a8d8214aaa947958e45cecbe1df751692a461f929802714d7af50e06
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.