Skip to main content

Crate rakers

Crate rakers 

Source
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§

HttpConfig
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 before and after, split on lines.
pretty_print
Indent html with 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 html that matches selector, 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, and html.