use std::{ borrow::Cow, cell::{Cell, Ref, RefCell}, collections::{HashSet, VecDeque}, rc::Rc, }; use html5ever::{ Attribute, LocalName, Namespace, QualName, tendril::StrTendril, tree_builder::{ElementFlags, NodeOrText, QuirksMode, TreeSink}, }; use url::Url; use crate::script_planning::{PreparedImportMap, PreparedScript}; use moli_dom::native::Node; use moli_dom::native::{ Attribute as NativeAttribute, DomHost, NativeDom, NativeDomNodes, NativeNodeId, }; use moli_page_types::{ScriptMode, ScriptRun}; use moli_stylesheet_blocking::{ DocumentBlockingStylesheetSignature, DocumentOwnedBlockingStylesheetDiscoveryInput, }; use super::live_target::new_live_fragment_root_html_tree_sink_stream; use super::live_target::{ ParserDomMutationConsumer, ParserDomReadConsumer, ParserElementCreationConsumer, ParserMutationEffectConsumer, ParserMutationEffectDelivery, ParserRuntimeDomSinks, ParserStreamHtmlTreeSinkTarget, new_live_document_root_html_tree_sink_stream, new_parser_stream_html_tree_sink_stream, }; use super::{ ParserSourcePosition, html_chunks, session::{HtmlParserSession, html_parse_opts_with_scripting}, stream::HtmlTreeSinkStream, }; /// HTML parser configured with the scripting state of the target `Document`. /// /// This state controls HTML parsing semantics such as `