Exemplo n.º 1
0
 public override void AppendEndOfFileToken(TreeConstruction tree, EndOfFileToken token)
 {
     // If the current node is not the root html element, then this is a parse error.
     // Note: It can only be the current node in the fragment case.
     OnMessageRaised(new SuddenlyEndAtElementError(token.Name));
     tree.Parser.Stop();
     return;
 }
Exemplo n.º 2
0
 public override void AppendEndOfFileToken(TreeConstruction tree, EndOfFileToken token)
 {
     string invalidOpenTag = tree.StackOfOpenElements.NotEither(myEndOfFilePermitOpenTags);
     if(invalidOpenTag != null){
         OnMessageRaised(new SuddenlyEndAtElementError(invalidOpenTag));
     }
     tree.Parser.Stop();
     return;
 }
Exemplo n.º 3
0
 public override void AppendEndOfFileToken(TreeConstruction tree, EndOfFileToken token)
 {
     OnMessageRaised(new SuddenlyEndAtElementError(tree.CurrentNode.Name));
     // Ignore?:
     // If the current node is a script element, mark the script element as "already started".
     tree.PopFromStack();
     tree.SwitchToOriginalInsertionMode();
     tree.ReprocessFlag = true;
     return;
 }
Exemplo n.º 4
0
 public override void AppendEndOfFileToken(TreeConstruction tree, EndOfFileToken token)
 {
     tree.Parser.Stop();
     return;
 }
Exemplo n.º 5
0
 public virtual void AppendEndOfFileToken(TreeConstruction tree, EndOfFileToken token)
 {
     AppendAnythingElse(tree, token);
 }