Class ProcessingInstruction

Processing instructions, including doc types.

Hierarchy (view full)

Constructors

Properties

data: string

The content of the data node

endIndex: null | number = null

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

name: string
next: null | ChildNode = null

Next sibling

parent: null | ParentNode = null

Parent of the node

prev: null | ChildNode = null

Previous sibling

sourceCodeLocation?: null | SourceCodeLocation

parse5 source code location info.

Available if parsing with parse5 and location info is enabled.

startIndex: null | number = null

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

type: Directive = ElementType.Directive

The type of the node.

x-name?: string

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

x-publicId?: string

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

x-systemId?: string

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

Accessors

  • get nodeValue(): string
  • Same as data. DOM spec-compatible alias.

    Returns string

  • set nodeValue(data): void
  • Parameters

    • data: string

    Returns void

Methods

  • Clone this node, and optionally its children.

    Type Parameters

    Parameters

    • this: T
    • recursive: boolean = false

      Clone child nodes as well.

    Returns T

    A clone of the node.