Some Questions About Tree Construction [html Spec]
I know that it's not customary to ask a bunch of questions in one, but just each question is interconnected with the previous one. And to ask a bunch of separate questions I think
Solution 1:
as soon as the tokenizer creates a new token it emit it into the tree manager and then continues makes the tokens. Am I right?
No, it must wait for the tree construction stage to handle the token, because that can affect the next thing that the tokenizer does. As the spec says in 12.2.5 Tokenization:
When a token is emitted, it must immediately be handled by the tree construction stage. The tree construction stage can affect the state of the tokenization stage, and can insert additional characters into the stream.
(I don't think I understand any of your other questions.)
Post a Comment for "Some Questions About Tree Construction [html Spec]"