Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

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

💧EventEmitter's typesafe replacement
Go to Latest
interface Text
implements CharacterData, Slotable
import { type Text } from "https://deno.land/x/evt@v2.5.6/lib/types/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
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.