DomTreeIterator class

DomTreeIterator is tool that will let you traverse the dom in the dom order and find all (or specific element).

Supports limiting traversal to the scope (element of the scope is included) Supports reverse traversal (find previous element)

Right now wrapped traversal is supported only if bounded to the scope. wrapped traversal will stop if it hits starting element

Implemented types

Constructors

DomTreeIterator(Element? element, {bool reverse = false, Element? scope, bool wraps = false})
Creates new dom iterator. element : element to start iteration from. reverse : if true, will iterate back in dom order. scope : scope to limit the iteration. wraps : if set to true, will not stop at the end of scope, but instead will wrap through beginning and will end upon hitting the starting element instead.

Properties

current Element
get current element
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

moveNext() bool
move to the next element, return false if no more elements there
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reversed({dynamic wraps}) DomTreeIterator
Returns another iterator, starting from the current element and heading reverse order. Scope is retained, while wrapping may be overriden if wraps is true or inherited from current as true, new wraps will start from current position.
toString() String
A string representation of this object.
inherited

Operators

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