Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Document

Re-exporting all of the node types.

Hierarchy

Index

Constructors

constructor

Properties

children

children: Node[]

endIndex

endIndex: null | number

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

next

next: null | Node

Next sibling

parent

parent: null | NodeWithChildren

Parent of the node

prev

prev: null | Node

Previous sibling

startIndex

startIndex: null | number

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

type

type: ElementType

Optional x-mode

x-mode: "no-quirks" | "quirks" | "limited-quirks"

Accessors

childNodes

  • get childNodes(): Node[]
  • set childNodes(children: Node[]): void
  • Returns Node[]

  • Parameters

    Returns void

firstChild

  • get firstChild(): null | Node
  • Returns null | Node

lastChild

  • get lastChild(): null | Node
  • Returns null | Node

nextSibling

  • get nextSibling(): null | Node
  • set nextSibling(next: null | Node): void
  • Returns null | Node

  • Parameters

    Returns void

nodeType

  • get nodeType(): number
  • Returns number

parentNode

  • Returns null | NodeWithChildren

  • Parameters

    Returns void

previousSibling

  • get previousSibling(): null | Node
  • set previousSibling(prev: null | Node): void
  • Returns null | Node

  • Parameters

    Returns void

Methods

cloneNode

  • cloneNode<T>(recursive?: boolean): T
  • Clone this node, and optionally its children.

    Type parameters

    Parameters

    • Optional recursive: boolean

      Clone child nodes as well.

    Returns T

    A clone of the node.