Skip to main content

apply_window_css

Function apply_window_css 

Source
pub fn apply_window_css(html: String, block: &str) -> String
Expand description

Splice a precomputed window CSS block into rendered HTML in one linear scan.

The block is placed inside <head> when present. Documents without a head fall back to the start of <body>, and finally to the end of the document, because injecting ahead of the doctype would force quirks mode.