Text class

The interface represents a text node in a DOM tree.

EventTarget

Node

CharacterData

Text

To understand what a text node is, consider the following document: [

Why yes. ] In that document, there are three text nodes, with the following contents:

"Aliens?" (the contents of the title element) "\n" (after the </head> end tag, a newline followed by a space) "Why yes.\n" (the contents of the body element)

Each of those text nodes is an object that has the properties and methods documented in this article.

Implemented types
Implementers
Available Extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

Text([String? data = ''])
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited