mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:17:35 +00:00
LibWeb: Add support for DOM's TreeWalker
This patch adds TreeWalker (created via Document.createTreeWalker()) which allows you to traverse a filtered view of the DOM in all directions.
This commit is contained in:
parent
fabcee016f
commit
acbdb95b0a
9 changed files with 487 additions and 0 deletions
20
Userland/Libraries/LibWeb/DOM/TreeWalker.idl
Normal file
20
Userland/Libraries/LibWeb/DOM/TreeWalker.idl
Normal file
|
@ -0,0 +1,20 @@
|
|||
#import <DOM/Node.idl>
|
||||
#import <DOM/NodeFilter.idl>
|
||||
|
||||
[Exposed=Window]
|
||||
interface TreeWalker {
|
||||
|
||||
[SameObject] readonly attribute Node root;
|
||||
readonly attribute unsigned long whatToShow;
|
||||
readonly attribute NodeFilter? filter;
|
||||
attribute Node currentNode;
|
||||
|
||||
Node? parentNode();
|
||||
Node? firstChild();
|
||||
Node? lastChild();
|
||||
Node? previousSibling();
|
||||
Node? nextSibling();
|
||||
Node? previousNode();
|
||||
Node? nextNode();
|
||||
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue