mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
fabcee016f
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.
19 lines
415 B
Plaintext
19 lines
415 B
Plaintext
#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();
|
|
|
|
};
|