mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Implement the create an element for token algorithm
This commit is contained in:
parent
9b3fc43f5a
commit
87475b11d3
4 changed files with 127 additions and 40 deletions
|
@ -16,7 +16,7 @@ use dom::htmlscriptelement::HTMLScriptElement;
|
|||
use dom::htmltemplateelement::HTMLTemplateElement;
|
||||
use dom::node::Node;
|
||||
use dom::processinginstruction::ProcessingInstruction;
|
||||
use dom::servoparser::Sink;
|
||||
use dom::servoparser::{ParsingAlgorithm, Sink};
|
||||
use html5ever::QualName;
|
||||
use html5ever::buffer_queue::BufferQueue;
|
||||
use html5ever::serialize::{AttrRef, Serialize, Serializer};
|
||||
|
@ -39,13 +39,15 @@ impl Tokenizer {
|
|||
pub fn new(
|
||||
document: &Document,
|
||||
url: ServoUrl,
|
||||
fragment_context: Option<super::FragmentContext>)
|
||||
fragment_context: Option<super::FragmentContext>,
|
||||
parsing_algorithm: ParsingAlgorithm)
|
||||
-> Self {
|
||||
let sink = Sink {
|
||||
base_url: url,
|
||||
document: Dom::from_ref(document),
|
||||
current_line: 1,
|
||||
script: Default::default(),
|
||||
parsing_algorithm: parsing_algorithm,
|
||||
};
|
||||
|
||||
let options = TreeBuilderOpts {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue