Function text

  • Render the document as text.

    This returns the textContent of the passed elements. The result will include the contents of script and stype elements. To avoid this, use .prop('innerText') instead.

    Returns

    The rendered document.

    Parameters

    • elements: ArrayLike<AnyNode>

      Elements to render.

    Returns string