Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Node

Re-exporting all of the node types.

Hierarchy

Index

Constructors

constructor

  • new Node(type: ElementType): Node
  • Parameters

    • type: ElementType

      The type of the node.

    Returns Node

Properties

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

Accessors

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.