Skip to main content

Class: ProcessingInstruction

Defined in: node_modules/domhandler/lib/node.d.ts:110

Processing instructions, including doc types.

Extends

  • DataNode

Constructors

Constructor

new ProcessingInstruction(name, data): ProcessingInstruction

Defined in: node_modules/domhandler/lib/node.d.ts:113

Parameters

name

string

data

string

Returns

ProcessingInstruction

Overrides

DataNode.constructor

Properties

data

data: string

Defined in: node_modules/domhandler/lib/node.d.ts:81

Inherited from

DataNode.data


endIndex

endIndex: null | number

Defined in: node_modules/domhandler/lib/node.d.ts:39

The end index of the node. Requires withEndIndices on the handler to be `true.

Inherited from

DataNode.endIndex


name

name: string

Defined in: node_modules/domhandler/lib/node.d.ts:111


next

next: null | ChildNode

Defined in: node_modules/domhandler/lib/node.d.ts:35

Next sibling

Inherited from

DataNode.next


parent

parent: null | ParentNode

Defined in: node_modules/domhandler/lib/node.d.ts:31

Parent of the node

Inherited from

DataNode.parent


prev

prev: null | ChildNode

Defined in: node_modules/domhandler/lib/node.d.ts:33

Previous sibling

Inherited from

DataNode.prev


sourceCodeLocation?

optional sourceCodeLocation: null | SourceCodeLocation

Defined in: node_modules/domhandler/lib/node.d.ts:45

parse5 source code location info.

Available if parsing with parse5 and location info is enabled.

Inherited from

DataNode.sourceCodeLocation


startIndex

startIndex: null | number

Defined in: node_modules/domhandler/lib/node.d.ts:37

The start index of the node. Requires withStartIndices on the handler to be `true.

Inherited from

DataNode.startIndex


type

type: Directive

Defined in: node_modules/domhandler/lib/node.d.ts:112

The type of the node.

Overrides

DataNode.type


x-name?

optional x-name: string

Defined in: node_modules/domhandler/lib/node.d.ts:116

If this is a doctype, the document type name (parse5 only).


x-publicId?

optional x-publicId: string

Defined in: node_modules/domhandler/lib/node.d.ts:118

If this is a doctype, the document type public identifier (parse5 only).


x-systemId?

optional x-systemId: string

Defined in: node_modules/domhandler/lib/node.d.ts:120

If this is a doctype, the document type system identifier (parse5 only).

Accessors

nextSibling

Get Signature

get nextSibling(): null | ChildNode

Defined in: node_modules/domhandler/lib/node.d.ts:67

Same as next. DOM spec-compatible alias.

Returns

null | ChildNode

Set Signature

set nextSibling(next): void

Defined in: node_modules/domhandler/lib/node.d.ts:68

Parameters
next

null | ChildNode

Returns

void

Inherited from

DataNode.nextSibling


nodeType

Get Signature

get nodeType(): 1

Defined in: node_modules/domhandler/lib/node.d.ts:114

DOM spec-compatible node type.

Returns

1

Overrides

DataNode.nodeType


nodeValue

Get Signature

get nodeValue(): string

Defined in: node_modules/domhandler/lib/node.d.ts:90

Same as data. DOM spec-compatible alias.

Returns

string

Set Signature

set nodeValue(data): void

Defined in: node_modules/domhandler/lib/node.d.ts:91

Parameters
data

string

Returns

void

Inherited from

DataNode.nodeValue


parentNode

Get Signature

get parentNode(): null | ParentNode

Defined in: node_modules/domhandler/lib/node.d.ts:55

Same as parent. DOM spec-compatible alias.

Returns

null | ParentNode

Set Signature

set parentNode(parent): void

Defined in: node_modules/domhandler/lib/node.d.ts:56

Parameters
parent

null | ParentNode

Returns

void

Inherited from

DataNode.parentNode


previousSibling

Get Signature

get previousSibling(): null | ChildNode

Defined in: node_modules/domhandler/lib/node.d.ts:61

Same as prev. DOM spec-compatible alias.

Returns

null | ChildNode

Set Signature

set previousSibling(prev): void

Defined in: node_modules/domhandler/lib/node.d.ts:62

Parameters
prev

null | ChildNode

Returns

void

Inherited from

DataNode.previousSibling

Methods

cloneNode()

cloneNode<T>(this, recursive?): T

Defined in: node_modules/domhandler/lib/node.d.ts:75

Clone this node, and optionally its children.

Type Parameters

T

T extends Node

Parameters

this

T

recursive?

boolean

Clone child nodes as well.

Returns

T

A clone of the node.

Inherited from

DataNode.cloneNode