Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/yxz/typing/lib.dom.ts>Text

Deno Standard Extensions
Latest
interface Text
import { type Text } from "https://deno.land/x/yxz@0.32.0/typing/lib.dom.ts";

The textual content of Element or Attr. If an element has no markup within its content, it has a single child implementing Text that contains the element's text. However, if the element contains markup, it is parsed into information items and Text nodes that form its children.

Properties

readonly
wholeText: string

Returns the combined data of all direct Text node siblings.

Methods

splitText(offset: number): Text

Splits data at the given offset and returns the remainder as Text node.