示例#1
0
 public HtmlError(HtmlReaderState state, HtmlErrorType errorType)
 {
     Line      = state.Line;
     Column    = state.Column;
     Offset    = state.Offset;
     ErrorType = errorType;
 }
 protected virtual void PushState(HtmlReaderState state)
 {
     if (state.ParserState == HtmlParserState.AttName)
     {
         _attIsScriptType = state.Value != null && _currentElement != null &&
                            state.Value.Equals("type", StringComparison.OrdinalIgnoreCase) &&
                            _currentElement.Equals("script", StringComparison.OrdinalIgnoreCase);
     }
     else if (_attIsScriptType && state.ParserState == HtmlParserState.AttValue && state.Value != null)
     {
         _typeAttribute = state.Value;
     }
     ParserStatesQueue.Enqueue(state);
 }