Expand description
Core rendering pipeline for rakers.
Parses HTML, collects and executes scripts in a sandboxed JS context, then serializes the post-execution DOM back to HTML.
Structs§
- Http
Config - HTTP options applied to every outbound request made by rakers.
Functions§
- clean_
document - Strip scripts and unwrap
<noscript>elements from rendered HTML. - diff_
html - Produce a unified diff between
beforeandafter, split on lines. - pretty_
print - Indent
htmlwith two-space indentation for human readability. - render
- Parse
input, execute its scripts, and return the rendered HTML. - render_
url - Fetch
url, execute its scripts, and return the rendered HTML. - select_
html - Return the outer HTML of every element in
htmlthat matchesselector, joined by newlines. Returns an empty string when nothing matches. - set_
verbose - Enable or disable verbose stderr output for the current thread.
- to_json
- Serialize render results as a JSON object with three fields:
raw_bytes,rendered_bytes, andhtml.