Skip to main content

first_non_head_element

Function first_non_head_element 

Source
pub fn first_non_head_element(nodes: &[TNode]) -> Option<(String, Span)>
Expand description

The first element in nodes that does not belong in a document’s head, with its span — None when every element is head-legal.

A browser relocates a body element out of the head rather than reporting it, so this is the only place the mistake can be caught where it was made.