DOMAsync class
A DOMNode that will be defined in the future.
Constructors
- DOMAsync({Object? loading, Future? future, Future function()?})
- DOMAsync.function(Future function(), [Object? loading])
- DOMAsync.future(Future future, [Object? loading])
Properties
- allowContent → bool
-
Indicates if this node accepts content.
finalinherited
- asDOMNode → DOMNode
-
no setterinherited
- commented ← bool
-
no getterinherited
-
content
→ List<
DOMNode> ? -
Actual list of nodes that represents the content of this node.
no setterinherited
- domGenerator → DOMGenerator?
-
Returns the DOMGenerator associated with treeMap.
no setterinherited
- function → Future Function()?
-
A Function that returns the Future that defines this node content.
final
- future → Future?
-
A Future that returns the final node content.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasOnGenerateListener → bool
-
Returns
true
if has any onGenerate listener registered.no setterinherited - hasOnlyElementNodes → bool
-
Returns
true
if this node content is empty (no children nodes). Returns ![isEmpty]. Returnstrue
if this node only have DOMElement nodes.no setterinherited - hasOnlyTextNodes → bool
-
Returns
true
if this node only have TextNode nodes.no setterinherited - hasParent → bool
-
Returns
true
if this node has a parent.no setterinherited - hasTemplate → bool
-
Returns
true
if this node has a DOMTemplate.no setterinherited - hasUnresolvedTemplate → bool
-
Returns
true
if this node has a text node with a unresolved DOMTemplate.no setterinherited - indexInParent → int
-
Returns the index position of this node in the parent.
no setterinherited
- isCommented → bool
-
If
true
this node is commented (ignored).no setterinherited - isEmptyContent → bool
-
Returns
true
if this node content is empty (no children nodes).no setterinherited - isGenerated → bool
-
Returns
true
if this node has a generated element by domGenerator.no setterinherited - isNotEmptyContent → bool
-
Returns ![isEmptyContent].
no setterinherited
- isStringElement → bool
-
Returns
true
if this element is a TextNode or a DOMElement of tag: sup, i, em, u, b, strong.no setterinherited - isWhiteSpaceContent → bool
-
Returns
true
if this node only have white space content.no setterinherited - length → int
-
Returns the total number of children nodes.
no setterinherited
- loading → Object?
-
Content to be showed while future/function is being executed.
final
-
nodes
→ List<
DOMNode> -
Returns a copy List of children nodes.
no setterinherited
- onGenerate → EventStream
-
Event handler for when this element is generated by DOMGenerator.
no setterinherited
- parent ↔ DOMNode?
-
Returns the parent DOMNode of generated tree (by DOMGenerator).
getter/setter pairinherited
- resolveFuture → Future?
-
Resolves the actual Future that will define this node content.
no setter
- root → DOMNode
-
Returns the root DOMNode of this element. If this node doesn't have
a parent, will return this instance as root.
no setterinherited
- runtime → DOMNodeRuntime
-
Returns a DOMNodeRuntime with the actual generated node
associated with treeMap and domGenerator.
no setterinherited
- runtimeNode → dynamic
-
Returns
runtime.node
.no setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- text → String
-
Returns the content of this node as text.
no setterinherited
- treeMap ↔ DOMTreeMap?
-
Returns the DOMTreeMap of the last generated tree of elements.
getter/setter pairinherited
Methods
-
absorbNode(
DOMNode other) → bool -
Absorb the content of
other
and appends to this node.inherited -
add(
Object? entry) → DOMNode -
inherited
-
addAll(
Iterable? entries) → DOMNode -
Adds all
entries
to children nodes.inherited -
addAsTag<
T> (String tag, T entry, [ContentGenerator< T> ? contentGenerator]) → DOMNode -
inherited
-
addEach<
T> (Iterable< T> iterable, [ContentGenerator<T> ? contentGenerator]) → DOMNode -
Adds each entry of
iterable
to content.inherited -
addEachAsTag<
T> (String tag, Iterable< T> iterable, [ContentGenerator<T> ? contentGenerator]) → DOMNode -
inherited
-
addHTML(
String html) → DOMNode -
Parses
html
and add it to content.inherited -
buildDOM<
T> ({DOMGenerator< T> ? generator, T? parent, DOMContext<T> ? context}) → T? -
Builds a DOM using
generator
.inherited -
buildHTML(
{bool withIndent = false, String parentIndent = '', String indent = ' ', bool disableIndent = false, bool xhtml = false, bool resolveDSX = false, bool buildTemplates = false, DOMNode? parentNode, DOMNode? previousNode, DOMContext? domContext}) → String -
Generates a HTML from this node tree.
inherited
-
catchNodesWhere<
T extends DOMNode> (Object? selector, List< T> destiny) → void -
inherited
-
checkNodes(
) → void -
Checks children nodes integrity.
inherited
-
clearNodes(
) → void -
Clear the children list.
inherited
-
containsNode(
DOMNode node, {dynamic deep = true}) → bool -
Returns
true
ifnode
is a child of this node.inherited -
copy(
) → DOMAsync -
Copies this node.
override
-
copyContent(
) → List< DOMNode> -
Copies this node content.
inherited
-
duplicate(
) → DOMNode? -
Duplicate this node and add it to the parent.
inherited
-
duplicateNode(
DOMNode node) → DOMNode? -
Duplicate
node
and add it to the children list.inherited -
getRuntime<
T> () → DOMNodeRuntime< T> -
Same as runtime, but casts to DOMNodeRuntime<T>.
inherited
-
getRuntimeNode<
T> () → T? -
Same as runtimeNode, but casts to
T
.inherited -
indexOf(
Object? selector) → int -
Returns the index of a child node that matches
selector
.inherited -
indexOfNode(
DOMNode node) → int -
Returns the index of
node
.inherited -
indexOfNodeIdentical(
DOMNode node) → int -
inherited
-
indexOfNodeIdenticalFirst(
DOMNode node) → int -
inherited
-
indexOfNodeWhere(
bool test(DOMNode node)) → int -
inherited
-
insertAfter(
Object? indexSelector, Object? entry) → DOMNode -
Inserts
entry
after index of child node that matchesindexSelector
.inherited -
insertAt(
Object? indexSelector, Object? entry) → DOMNode -
Inserts
entry
at index of child node that matchesindexSelector
.inherited -
isCompatibleForMerge(
DOMNode other) → bool -
Returns
true
ifother
is compatible for merging.inherited -
isConsecutiveNode(
DOMNode other) → bool -
Returns
true
ifother
is the previous or next sibling of this node parent.inherited -
isInSameParent(
DOMNode other) → bool -
Returns
true
ifother
is in the same parent of this node.inherited -
isNextNode(
DOMNode other) → bool -
Returns
true
ifother
is the next sibling of this node parent.inherited -
isPreviousNode(
DOMNode other) → bool -
Returns
true
ifother
is the previous sibling of this node parent.inherited -
merge(
DOMNode other, {bool onlyConsecutive = true}) → bool -
Merges
other
node into this node.inherited -
moveDown(
) → bool -
Moves this node down in the parent children list.
inherited
-
moveDownNode(
DOMNode node) → bool -
Moves
node
down in the children list.inherited -
moveUp(
) → bool -
Moves this node up in the parent children list.
inherited
-
moveUpNode(
DOMNode node) → bool -
Moves
node
up in the children list.inherited -
node<
T extends DOMNode> (Object? selector) → T? -
inherited
-
nodeByID<
T extends DOMNode> (String? id) → T? -
Returns a child node by
id
.inherited -
nodeByIndex<
T extends DOMNode> (int? index) → T? -
Returns a child node by
index
.inherited -
nodeEquals<
T extends DOMNode> (DOMNode? node) → T? -
Returns a node
T
that is equals tonode
.inherited -
nodesWhere<
T extends DOMNode> (Object? selector) → List< T> -
Returns a List<T> of children nodes that matches
selector
.inherited -
nodeWhere<
T extends DOMNode> (Object? selector) → T? -
inherited
-
normalizeContent(
) → void -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyElementGenerated(
Object? element) → void -
Dispatch a onGenerate event with
element
.inherited -
remove(
) → bool -
Removes this node from parent.
inherited
-
removeNode(
DOMNode node) → bool -
Removes
node
from children list.inherited -
select<
T extends DOMNode> (Object? selector) → T? -
Returns a node
T
that matchesselector
.inherited -
selectAllByType<
T extends DOMNode> () → List< T> -
Returns a List<T> of children nodes that are of type
T
.inherited -
selectAllWhere<
T extends DOMNode> (Object? selector) → List< T> -
Returns a List<T> of children nodes that matches
selector
.inherited -
selectByID<
T extends DOMNode> (String? id) → T? -
Returns a node
T
that has attributeid
.inherited -
selectByTag<
T extends DOMNode> (List< String> ? tags) → T? -
Returns a node
T
that is one oftags
.inherited -
selectByType<
T extends DOMNode> () → T? -
Returns a child node of type
T
.inherited -
selectEquals<
T extends DOMNode> (DOMNode? node) → T? -
inherited
-
selectParentWhere<
T extends DOMNode> (Object? selector) → T? -
Returns a parent
T
that matchesselector
.inherited -
selectWhere<
T extends DOMNode> (Object? selector) → T? -
Returns a
T
child node that matchesselector
.inherited -
selectWithAllClasses<
T extends DOMNode> (List< String> ? classes) → T? -
Returns a node
T
that has allclasses
.inherited -
selectWithAnyClass<
T extends DOMNode> (List< String> ? classes) → T? -
Returns a node
T
that has any ofclasses
.inherited -
setContent(
Object? newContent) → DOMNode -
Sets the content of this node.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited