Module

x/evt/lib/index.ts>dom.Text

šŸ’§EventEmitter's typesafe replacement
Go to Latest
interface dom.Text
implements CharacterData, Slotable
import { type dom } from "https://deno.land/x/evt@v2.3.1/lib/index.ts";
const { Text } = dom;

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
assignedSlot: HTMLSlotElement | null
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.