abstractNodeWithChildren
Hierarchy
Index
Constructors
constructor
Parameters
children: ChildNode[]
Children of the node. Only certain node types can have children.
Returns NodeWithChildren
Properties
publicchildren
Children of the node. Only certain node types can have children.
endIndex
The end index of the node. Requires withEndIndices
on the handler to be `true.
next
Next sibling
abstractreadonlynodeType
DOM spec-compatible node type.
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.
abstractreadonlytype
The type of the node.
Accessors
childNodes
close
firstChild
First child of the node.
Returns null | ChildNode
lastChild
Last child of the node.
Returns null | ChildNode
loc
nextSibling
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.
A node that can have children.