Class: abstract
Node
This object will be used as the prototype for Nodes when creating a DOM-Level-1-compliant structure.
Constructors
new Node()
new Node():
Node
Returns
Properties
endIndex
endIndex:
null
|number
The end index of the node. Requires withEndIndices
on the handler to be `true.
Defined in
node_modules/domhandler/lib/node.d.ts:39
next
next:
null
|ChildNode
Next sibling
Defined in
node_modules/domhandler/lib/node.d.ts:35
nodeType
abstract
readonly
nodeType:number
DOM spec-compatible node type.
Defined in
node_modules/domhandler/lib/node.d.ts:50
parent
parent:
null
|ParentNode
Parent of the node
Defined in
node_modules/domhandler/lib/node.d.ts:31
prev
prev:
null
|ChildNode
Previous sibling
Defined in
node_modules/domhandler/lib/node.d.ts:33
sourceCodeLocation?
optional
sourceCodeLocation:null
|SourceCodeLocation
parse5
source code location info.
Available if parsing with parse5 and location info is enabled.
Defined in
node_modules/domhandler/lib/node.d.ts:45
startIndex
startIndex:
null
|number
The start index of the node. Requires withStartIndices
on the handler to be `true.
Defined in
node_modules/domhandler/lib/node.d.ts:37
type
abstract
readonly
type:ElementType
The type of the node.
Defined in
node_modules/domhandler/lib/node.d.ts:29
Accessors
nextSibling
get
nextSibling():null
|ChildNode
Same as next. DOM spec-compatible alias.
set
nextSibling(next
):void
Parameters
• next: null
| ChildNode
Returns
null
| ChildNode
Defined in
node_modules/domhandler/lib/node.d.ts:67
parentNode
get
parentNode():null
|ParentNode
Same as parent. DOM spec-compatible alias.
set
parentNode(parent
):void
Parameters
• parent: null
| ParentNode
Returns
null
| ParentNode
Defined in
node_modules/domhandler/lib/node.d.ts:55
previousSibling
get
previousSibling():null
|ChildNode
Same as prev. DOM spec-compatible alias.
set
previousSibling(prev
):void
Parameters
• prev: null
| ChildNode
Returns
null
| ChildNode
Defined in
node_modules/domhandler/lib/node.d.ts:61
Methods
cloneNode()
cloneNode<
T
>(this
,recursive
?):T
Clone this node, and optionally its children.
Type Parameters
• T extends Node
Parameters
• this: T
• recursive?: boolean
Clone child nodes as well.
Returns
T
A clone of the node.
Defined in
node_modules/domhandler/lib/node.d.ts:75