Skip to main content

set_head_html

Function set_head_html 

Source
pub fn set_head_html(html: &str)
Expand description

Record the head HTML a page rendered, and merge it into the document’s head the way a browser host does (runtime.js’s mergeIntoHead): each element with an identity replaces every element of that identity already there, and joins the head at its end; one without is simply added. Called once, at mount.

What is recorded (head_html) is the page’s declared head after that same merge — a layout’s Head: and the page’s own arrive as one string, and a server composing the document from it must see the page’s title, not both — each surviving tag exactly as it was written.