DOMNodeRuntime<T> class abstract

Wraps the actual generated node T and allows some operations over it.

Implementers
Available Extensions

Constructors

DOMNodeRuntime(DOMTreeMap<T>? treeMap, DOMNode? domNode, T? node)

Properties

children List<T>
Returns the List of children nodes.
no setter
classes List<String>
Returns the classes of this node.
no setter
domGenerator DOMGenerator<T>
The DOMGenerator used to generate this treeMap.
no setter
domNode DOMNode?
The DOMNode of this node.
final
exists bool
Returns true if this node and domNode exists.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasParent bool
Returns true if this node has a parent.
no setter
indexInParent int
no setter
isStringElement bool
Returns true if this node is a String element (a Text node or DOMElement.isStringTagName).
no setter
node → T?
The runtime node (generated element/node).
final
nodesLength int
Returns the number of children nodes.
no setter
parent → T?
This node parent.
no setter
parentRuntime DOMNodeRuntime<T>?
The DOMNodeRuntime of parent.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
style CSS
Gets runtime style of node as CSS.
getter/setter pair
tagName String?
The tag name of this node.
no setter
text String
Returns the text of this node.
getter/setter pair
treeMap DOMTreeMap<T>?
final
value String?
getter/setter pair

Methods

absorbNode(T? other) bool
add(T child) → void
Adds child node.
addClass(String? className) → void
Adds a className to this node classes.
clear() → void
clearClasses() → void
Clears classes from this node classes.
copy() → T?
Copies this node.
duplicate() → T?
Duplicates this node, inserting it at parent.
getAttribute(String name) String?
Returns the value of the attribute of name.
getNodeAt(int index) → T?
Returns the node at index.
getSiblingRuntime(T? other) DOMNodeRuntime<T>?
getStyleEntry(String name) CSSEntry<CSSValue>?
Gets a runtime style CSSEntry for name from node.
getStyleProperty(String name) String?
Gets a runtime style property for name from node.
indexOf(T child) int
Returns the index of child.
insertAt(int index, T? child) → void
Inserts child node at index.
isConsecutiveNode(T other) bool
isInSameParent(T other) bool
Returns true if other is in the same parent of this node.
isNextNode(T? other) bool
isPreviousNode(T? other) bool
mergeNode(T? other, {bool onlyConsecutive = true}) bool
moveDown() bool
Moves this node down in parent's children.
moveUp() bool
Moves this node up in parent's children.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove() bool
Removes this node.
removeAt(int index) → T?
Removes child node at index.
removeAttribute(String name) → void
Removes the attribute of name.
removeClass(String? className) bool
Removes className from this node classes.
removeNode(T? child) bool
Removes child node.
removeStyleEntries(List<String> names) List<CSSEntry<CSSValue>>
removeStyleEntry(String name) CSSEntry<CSSValue>?
removeStyleProperties(List<String> names) Map<String, String>
removeStyleProperty(String name) String?
replaceBy(List? elements, {bool remap = false}) bool
Replaces this node with elements.
setAttribute(String name, String value) → void
Sets the value of the attribute of name.
setStyleProperties(Map<String, String> properties) → void
setStyleProperty(String name, String value) String?
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](String name) String?
operator []=(String name, Object? value) → void