Skip to main content

DataNode

The DataNode element extends the one from Domhandler to add some extra properties (https://domhandler.js.org/classes/DataNode.html)

Hierarchy

Index

Constructors

constructor

  • new DataNode(type: Text | Directive | Comment, data: string): DataNode
  • Parameters

    • type: Text | Directive | Comment

      The type of the node

    • data: string

      The content of the data node

    Returns DataNode

Properties

children

children: Node[] = []

close

close: undefined | CharValue

data

data: string

loc

loc: Range

open

open: CharValue

parent

parent: null | NodeWithChildren = null

Accessors

nodeValue

  • get nodeValue(): string
  • set nodeValue(data: string): void
  • Returns string

  • Parameters

    • data: string

    Returns void