Class Tokenizer

Constructors

Properties

Methods

_advanceBy _appendCharToCurrentCharacterToken _callState _consume _consumeSequenceIfMatch _createAttr _createCharacterToken _createCommentToken _createDoctypeToken _createEndTagToken _createStartTagToken _emitChars _emitCodePoint _emitCurrentCharacterToken _emitEOFToken _ensureHibernation _err _flushCodePointConsumedAsCharacterReference _isCharacterReferenceInAttribute _leaveAttrName _leaveAttrValue _runParsingLoop _startCharacterReference _stateAfterAttributeName _stateAfterAttributeValueQuoted _stateAfterDoctypeName _stateAfterDoctypePublicIdentifier _stateAfterDoctypePublicKeyword _stateAfterDoctypeSystemIdentifier _stateAfterDoctypeSystemKeyword _stateAmbiguousAmpersand _stateAttributeName _stateAttributeValueDoubleQuoted _stateAttributeValueSingleQuoted _stateAttributeValueUnquoted _stateBeforeAttributeName _stateBeforeAttributeValue _stateBeforeDoctypeName _stateBeforeDoctypePublicIdentifier _stateBeforeDoctypeSystemIdentifier _stateBetweenDoctypePublicAndSystemIdentifiers _stateBogusComment _stateBogusDoctype _stateCdataSection _stateCdataSectionBracket _stateCdataSectionEnd _stateCharacterReference _stateComment _stateCommentEnd _stateCommentEndBang _stateCommentEndDash _stateCommentLessThanSign _stateCommentLessThanSignBang _stateCommentLessThanSignBangDash _stateCommentLessThanSignBangDashDash _stateCommentStart _stateCommentStartDash _stateData _stateDoctype _stateDoctypeName _stateDoctypePublicIdentifierDoubleQuoted _stateDoctypePublicIdentifierSingleQuoted _stateDoctypeSystemIdentifierDoubleQuoted _stateDoctypeSystemIdentifierSingleQuoted _stateEndTagOpen _stateMarkupDeclarationOpen _statePlaintext _stateRawtext _stateRawtextEndTagName _stateRawtextEndTagOpen _stateRawtextLessThanSign _stateRcdata _stateRcdataEndTagName _stateRcdataEndTagOpen _stateRcdataLessThanSign _stateScriptData _stateScriptDataDoubleEscaped _stateScriptDataDoubleEscapedDash _stateScriptDataDoubleEscapedDashDash _stateScriptDataDoubleEscapedLessThanSign _stateScriptDataDoubleEscapeEnd _stateScriptDataDoubleEscapeStart _stateScriptDataEndTagName _stateScriptDataEndTagOpen _stateScriptDataEscaped _stateScriptDataEscapedDash _stateScriptDataEscapedDashDash _stateScriptDataEscapedEndTagName _stateScriptDataEscapedEndTagOpen _stateScriptDataEscapedLessThanSign _stateScriptDataEscapeStart _stateScriptDataEscapeStartDash _stateScriptDataLessThanSign _stateSelfClosingStartTag _stateTagName _stateTagOpen emitCurrentComment emitCurrentDoctype emitCurrentTagToken getCurrentLocation handleSpecialEndTag insertHtmlAtCurrentPos pause prepareToken resume write

Constructors

Properties

active: boolean = false
consumedAfterSnapshot: number = -1
currentAttr: Attribute = ...
currentCharacterToken: null | CharacterToken = null
currentLocation: null | Location
currentToken: null | Token = null
entityDecoder: EntityDecoder

We use entities' EntityDecoder to parse character references.

All of the following states are handled by the EntityDecoder:

  • Named character reference state
  • Numeric character reference state
  • Hexademical character reference start state
  • Hexademical character reference state
  • Decimal character reference state
  • Numeric character reference end state
entityStartPos: number = 0
handler: TokenHandler
inForeignNode: boolean = false

Indicates that the current adjusted node exists, is not an element in the HTML namespace, and that it is not an integration point for either MathML or HTML.

inLoop: boolean = false

Ensures that the parsing loop isn't run multiple times at once.

lastStartTagName: string = ''
paused: boolean = false
preprocessor: Preprocessor
returnState: State = State.DATA
state: State = State.DATA

Methods

  • Parameters

    • pattern: string
    • caseSensitive: boolean

    Returns boolean

  • Parameters

    • attrNameFirstCh: string

    Returns void

  • Parameters

    • initialName: null | string

    Returns void

  • Parameters

    • cp: number

    Returns void

  • Parameters

    • cp: number

    Returns void

  • Parameters

    • cp: number

    Returns void

  • Parameters

    • cp: number

    Returns void

  • Parameters

    • cp: number

    Returns void

  • Parameters

    • cp: number

    Returns void

  • Parameters

    • cp: number

    Returns void

  • Parameters

    • OptionalwriteCallback: (() => void)
        • (): void
        • Returns void

    Returns void

  • Parameters

    • chunk: string
    • isLastChunk: boolean
    • OptionalwriteCallback: (() => void)
        • (): void
        • Returns void

    Returns void