Skip to main content

Module serialize

Module serialize 

Source
Expand description

HTML serialization utilities.

This module provides functions for serializing DOM nodes back to HTML and extracting text content. These functions are used by all bindings (Python, Node.js, WASM) to implement inner_html, outer_html, and text properties.

Traits§

HtmlSerializer
Trait for types that can be serialized to HTML.

Functions§

collect_text
Collects text content from a node and its descendants.
serialize_inner_html
Serializes only the children of a node to HTML (inner HTML).
serialize_node
Serializes a DOM node and its subtree to HTML.