parser_context_for_document

Function parser_context_for_document 

Source
pub(crate) fn parser_context_for_document<'a>(
    document: &'a Document,
    rule_type: CssRuleType,
    parsing_mode: ParsingMode,
    url_data: &'a UrlExtraData,
) -> ParserContext<'a>
Expand description

Creates a ParserContext from the given document.

Automatically configures quirks mode and error reporter from the document.