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);
 }
        public virtual bool Read()
        {
            if (ParserStatesQueue.Count > 0)
            {
                State = ParserStatesQueue.Dequeue();
                return(true);
            }

            if (_eof)
            {
                return(false);
            }

            DoRead();

            if (ParserStatesQueue.Count > 0)
            {
                State = ParserStatesQueue.Dequeue();
                return(true);
            }

            return(false);
        }