Skip to main content

Module html5

Module html5 

Source
Expand description

Html5Document — an HTML document backed by the html5ever parser.

This module exposes a single public type, Html5Document, which wraps the shared HtmlBase rendering pipeline and uses parse_html5 to build the document tree.

Use Html5Document when HTML5 conformance matters more than offset precision — for example, the dictionary view, which renders content from third-party dictionaries that may contain entities, void elements, and implicitly-closed tags. Because node offsets are synthetic (not byte positions), reading positions must not be persisted when using this type.

Structs§

Html5Document
HTML document backed by the html5ever spec-compliant parser.

Constants§

USER_STYLESHEET 🔒
Default user-editable stylesheet for dictionary rendering.
VIEWER_STYLESHEET 🔒
Default viewer stylesheet for dictionary rendering.