Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MLDOMElement<T, O>

Type parameters

  • T: RuleConfigValue

  • O

Hierarchy

Implements

Index

Constructors

constructor

Properties

Private #doc

#doc: Document<T, O>

Readonly Private #endCol

#endCol: number

Readonly Private #endLine

#endLine: number

Readonly Private #endOffset

#endOffset: number

Private #fixed

#fixed: string

Private #fixedNodeName

#fixedNodeName: string

Private #indentaion

#indentaion: MLDOMIndentation<T, O> | null | undefined

indentation cache props

Private #prevToken

#prevToken: AnonymousNode<T, O> | null | undefined

prevToken cache props

Readonly Private #raw

#raw: string

Readonly Private #startCol

#startCol: number

Readonly Private #startLine

#startLine: number

Readonly Private #startOffset

#startOffset: number

Readonly Private #tagCloseChar

#tagCloseChar: string

Readonly Private #tagOpenChar

#tagOpenChar: string

Protected _astToken

_astToken: MLASTElement

Readonly attributes

Readonly childModels

childModels: Set<ContentModel> = new Set()

Readonly closeTag

closeTag: MLDOMElementCloseTag<T, O> | null

Readonly descendantModels

descendantModels: Set<ContentModel> = new Set()

Readonly endSpace

endSpace: MLDOMToken<MLToken>

Readonly isForeignElement

isForeignElement: boolean

Readonly namespaceURI

namespaceURI: string

Readonly nodeName

nodeName: string

Readonly ownModels

ownModels: Set<ContentModel> = new Set()

Readonly rules

rules: Rules

Readonly selfClosingSolidus

selfClosingSolidus: MLDOMToken<MLToken>

Readonly type

type: "Element" = "Element"

Readonly uuid

uuid: string

Accessors

childNodes

  • Returns AnonymousNode<T, O>[]

classList

  • get classList(): string[]
  • Returns string[]

endCol

  • get endCol(): number
  • Returns number

endLine

  • get endLine(): number
  • Returns number

endOffset

  • get endOffset(): number
  • Returns number

id

  • get id(): string
  • Returns string

indentation

nextNode

nodeStore

originRaw

  • get originRaw(): string
  • Returns string

parentNode

prevNode

prevToken

raw

  • get raw(): string
  • Returns string

rule

  • get rule(): RuleInfo<T, O>

startCol

  • get startCol(): number
  • Returns number

startLine

  • get startLine(): number
  • Returns number

startOffset

  • get startOffset(): number
  • Returns number

syntaxicalParentNode

Methods

closest

  • Parameters

    • selector: string

    Returns null | MLDOMElement<T, O>

fix

  • fix(raw: string): void
  • Parameters

    • raw: string

    Returns void

fixNodeName

  • fixNodeName(name: string): void
  • Parameters

    • name: string

    Returns void

getAttribute

  • getAttribute(attrName: string): null | string
  • Parameters

    • attrName: string

    Returns null | string

getAttributeToken

getChildElementsAndTextNodeWithoutWhitespaces

  • Returns (MLDOMElement<T, O> | MLDOMText<T, O>)[]

getNameLocation

  • getNameLocation(): { col: number; line: number; offset: number }
  • Returns { col: number; line: number; offset: number }

    • col: number
    • line: number
    • offset: number

hasAttribute

  • hasAttribute(attrName: string): boolean
  • Parameters

    • attrName: string

    Returns boolean

hasMutableChildren

  • hasMutableChildren(): boolean
  • This element has "Preprocessor Specific Block". In other words, Its children are potentially mutable.

    Returns boolean

is

isDescendantByUUIDList

  • isDescendantByUUIDList(uuidList: string[]): boolean
  • Parameters

    • uuidList: string[]

    Returns boolean

matches

  • matches(selector: string): boolean
  • Parameters

    • selector: string

    Returns boolean

querySelectorAll

  • Parameters

    • selector: string

    Returns (MLDOMElement<T, O> | MLDOMText<T, O>)[]

toString

  • toString(): string

Generated using TypeDoc