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
Properties
- assignedSlot → HTMLSlotElement?
-
Available on Slottable, provided by the PropsSlottable extension
no setter - baseURI → String
-
Available on Node, provided by the PropsNode extension
no setter - childNodes → NodeList
-
Available on Node, provided by the PropsNode extension
no setter - data ↔ String
-
Available on CharacterData, provided by the PropsCharacterData extension
getter/setter pair - firstChild → Node?
-
Available on Node, provided by the PropsNode extension
no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- isConnected → bool
-
Available on Node, provided by the PropsNode extension
no setter - lastChild → Node?
-
Available on Node, provided by the PropsNode extension
no setter - length → int
-
Available on CharacterData, provided by the PropsCharacterData extension
no setter - nextElementSibling → Element?
-
Available on NonDocumentTypeChildNode, provided by the PropsNonDocumentTypeChildNode extension
no setter - nextSibling → Node?
-
Available on Node, provided by the PropsNode extension
no setter - nodeName → String
-
Available on Node, provided by the PropsNode extension
no setter - nodeType → int
-
Available on Node, provided by the PropsNode extension
no setter - nodeValue ↔ String?
-
Available on Node, provided by the PropsNode extension
getter/setter pair - ownerDocument → Document?
-
Available on Node, provided by the PropsNode extension
no setter - parentElement → Element?
-
Available on Node, provided by the PropsNode extension
no setter - parentNode → Node?
-
Available on Node, provided by the PropsNode extension
no setter - previousElementSibling → Element?
-
Available on NonDocumentTypeChildNode, provided by the PropsNonDocumentTypeChildNode extension
no setter - previousSibling → Node?
-
Available on Node, provided by the PropsNode extension
no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- textContent ↔ String?
-
Available on Node, provided by the PropsNode extension
getter/setter pair - wholeText → String
-
Available on Text, provided by the PropsText extension
no setter
Methods
-
addEventListener(
String type, EventListener? callback, [dynamic options]) → void -
Available on EventTarget, provided by the PropsEventTarget extension
-
after(
[dynamic nodes1, dynamic nodes2, dynamic nodes3]) → void -
Available on ChildNode, provided by the PropsChildNode extension
-
appendChild(
Node node) → Node -
appendData(
String data) → void -
Available on CharacterData, provided by the PropsCharacterData extension
-
before(
[dynamic nodes1, dynamic nodes2, dynamic nodes3]) → void -
Available on ChildNode, provided by the PropsChildNode extension
-
cloneNode(
[bool? deep = false]) → Node -
compareDocumentPosition(
Node other) → int -
contains(
Node? other) → bool -
convertPointFromNode(
DOMPointInit point, dynamic from, [ConvertCoordinateOptions? options]) → DOMPoint -
Available on GeometryUtils, provided by the PropsGeometryUtils extension
-
convertQuadFromNode(
DOMQuadInit quad, dynamic from, [ConvertCoordinateOptions? options]) → DOMQuad -
Available on GeometryUtils, provided by the PropsGeometryUtils extension
-
convertRectFromNode(
DOMRectReadOnly rect, dynamic from, [ConvertCoordinateOptions? options]) → DOMQuad -
Available on GeometryUtils, provided by the PropsGeometryUtils extension
-
deleteData(
int offset, int count) → void -
Available on CharacterData, provided by the PropsCharacterData extension
-
dispatchEvent(
Event event) → bool -
Available on EventTarget, provided by the PropsEventTarget extension
-
getBoxQuads(
[BoxQuadOptions? options]) → Iterable< DOMQuad> -
Available on GeometryUtils, provided by the PropsGeometryUtils extension
-
getRootNode(
[GetRootNodeOptions? options]) → Node -
hasChildNodes(
) → bool -
insertBefore(
Node node, Node? child) → Node -
insertData(
int offset, String data) → void -
Available on CharacterData, provided by the PropsCharacterData extension
-
isDefaultNamespace(
String? namespace) → bool -
isEqualNode(
Node? otherNode) → bool -
isSameNode(
Node? otherNode) → bool -
lookupNamespaceURI(
String? prefix) → String? -
lookupPrefix(
String? namespace) → String? -
normalize(
) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
) → void -
Available on ChildNode, provided by the PropsChildNode extension
-
removeChild(
Node child) → Node -
removeEventListener(
String type, EventListener? callback, [dynamic options]) → void -
Available on EventTarget, provided by the PropsEventTarget extension
-
replaceChild(
Node node, Node child) → Node -
replaceData(
int offset, int count, String data) → void -
Available on CharacterData, provided by the PropsCharacterData extension
-
replaceWith(
[dynamic nodes1, dynamic nodes2, dynamic nodes3]) → void -
Available on ChildNode, provided by the PropsChildNode extension
-
splitText(
int offset) → Text -
substringData(
int offset, int count) → String -
Available on CharacterData, provided by the PropsCharacterData extension
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited