
This patch adds NodeIterator (created via Document.createNodeIterator()) which allows you to iterate through all the nodes in a subtree while filtering with a provided NodeFilter callback along the way. This first cut implements the full API, but does not yet handle nodes being removed from the document while referenced by the iterator. That will be done in a subsequent patch.
18 lines
415 B
Text
18 lines
415 B
Text
#import <DOM/Node.idl>
|
|
#import <DOM/NodeFilter.idl>
|
|
|
|
[Exposed=Window]
|
|
interface NodeIterator {
|
|
|
|
[SameObject] readonly attribute Node root;
|
|
readonly attribute Node referenceNode;
|
|
readonly attribute boolean pointerBeforeReferenceNode;
|
|
readonly attribute unsigned long whatToShow;
|
|
readonly attribute NodeFilter? filter;
|
|
|
|
Node? nextNode();
|
|
Node? previousNode();
|
|
|
|
undefined detach();
|
|
|
|
};
|