Text
Hierarchy
- DataNode
- Text
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
Parameters
data: string
The content of the data node
Returns Text
Properties
children
publicdata
The content of the data node
endIndex
The end index of the node. Requires withEndIndices
on the handler to be `true.
next
Next sibling
parent
Parent of the node
prev
Previous sibling
optionalsourceCodeLocation
parse5
source code location info.
Available if parsing with parse5 and location info is enabled.
startIndex
The start index of the node. Requires withStartIndices
on the handler to be `true.
type
The type of the node.
Accessors
close
loc
nextSibling
nodeType
DOM spec-compatible node type.
Returns 3
nodeValue
Same as data. DOM spec-compatible alias.
Returns string
Parameters
data: string
Returns void
open
parentNode
Same as parent. DOM spec-compatible alias.
Returns null | ParentNode
Parameters
parent: null | ParentNode
Returns void
previousSibling
Methods
cloneNode
Clone this node, and optionally its children.
Type parameters
- T: Node
Parameters
this: T
recursive: boolean = false
Clone child nodes as well.
Returns T
A clone of the node.
Text within the document.