Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

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

Deno Standard Extensions
Go to Latest
interface Text
import { type Text } from "https://deno.land/x/yxz@0.17.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.