Function getText

  • getText(node: AnyNode | AnyNode[]): string
  • Get a node's inner text. Same as textContent, but inserts newlines for <br> tags. Ignores comments.

    Deprecated

    Use textContent instead.

    Returns

    node's inner text.

    Parameters

    • node: AnyNode | AnyNode[]

      Node to get the inner text of.

    Returns string